- 博客(4)
- 收藏
- 关注
原创 数组冒泡排序,选择排序,逆序,折半查找,遍历方法
public class Hello2{public static void main(String[] args) {int arr[] ={2,3,5,6};// 调用方法是有先后顺序的//xuanZe(arr);//maoPao(arr); //niXu(arr);//bianLi(arr);int index=zheBan(arr,5);System
2017-10-29 22:58:48
374
原创 用for循环实现在控制台打印九九乘法口诀表
public class Hello1{public static void main(String []args){print99(9);}public static void print99(int n){for(int i=1;ifor(int j=1;jSystem.out.print(i+"*"+j+"="+i*j+"\t"); //pint不换行}S
2017-10-23 01:13:44
1230
原创 定义一个计算机类:属性:品牌;价格;颜色; 方法:(1)编程的功能 (2)上网的功能 实例化两个对象:“lenovo”;“hasee”
public class Computer{public static void main(String[]args){Com lenovo = new Com();lenovo.brand="lenovo";lenovo.price=4500;lenovo.color="白色";//调用方法lenovo.program();lenovo.shangWang
2017-10-23 01:08:18
5170
原创 用for循环实现在控制台打印一个矩形
public class Hello{public static void main(String []args){//number(3,3); //调用无返回值有参数方法 //number1(); //调用无返回值无参数方法}/*无返回值有参数的m行n列*/public static void number(int m, int n){for(int i=1;
2017-10-23 00:56:41
3955
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人