摘要: import java.io.*;public class BRRead { public static void main(String args[]) throws IOException { char c; // 使用 System.in 创建 BufferedReader BufferedR 阅读全文
posted @ 2018-10-08 17:44 爱晒太阳的懒猫。。 阅读(128) 评论(0) 推荐(0) 编辑
摘要: class A{ void p(int[] a){ int i; for(i=0;i<6;i++){ System.out.println(a[i]); } } void q(String[] b){ int i; for(i=0;i<3;i++){ System.out.println(b[i]) 阅读全文
posted @ 2018-10-08 17:36 爱晒太阳的懒猫。。 阅读(1003) 评论(0) 推荐(0) 编辑
摘要: public class TestArray { public static void main(String arg[]){ int[] list = {1,2,3,4,5,6}; int[] lists = new int[3]; int i; lists[0] = 2; lists[1] = 阅读全文
posted @ 2018-10-08 17:09 爱晒太阳的懒猫。。 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 1.类变量:独立于方法之外的变量,用 static 修饰。 2.实例变量:在类之内,在方法之外。(注意:这里变量可以不初始化) 3.局部变量:在方法之内(注意:变量必须要初始化,否则会报错) public class A() { static int a = 10;//类变量(静态变量) int b 阅读全文
posted @ 2018-10-08 16:37 爱晒太阳的懒猫。。 阅读(246) 评论(0) 推荐(0) 编辑