摘要:
上代码:package com.wjy;public class Test {public static void main(String[] args) {int[] attay = new int[5];for (int i : attay) {System.out.println("it is " + i);}}}运行结果:it is 0it is 0it is 0it is 0it is 0 阅读全文
posted @ 2013-04-12 09:51
王吉元
阅读(139)
评论(0)
推荐(0)
摘要:
上代码:package com.wjy;public class Test { public static void main(String[] args){ Student s1=new Student(99); }}class Student{public static Student stu=new Student(22);//这里必须要static修饰,否则会出错。public Student(int age){System.out.println("The age is: "+age);}}运行结果:The age is: 22The age is: 99再看一个 阅读全文
posted @ 2013-04-12 09:48
王吉元
阅读(167)
评论(0)
推荐(0)
浙公网安备 33010602011771号