摘要: 方法的重载 同名不同参 l 重载方法参数必须不同: 参数个数不同,如method(int x)与method(int x,int y)不同 参数类型不同,如method(int x)与method(double x)不同 参数顺序不同,如method(int x,double y)与method(d 阅读全文
posted @ 2020-06-30 16:38 2020小白 阅读(673) 评论(0) 推荐(0)
摘要: 一。一维数组 1.数组的创建三种方式 (1)。数据类型[] 数组名 = new 数据类型[元素个数或数组长度]; int[] arr=new int[4];//赋值arr[0]=99;arr[1]=98;arr[2]=97;int sum=0;for(int i=0;i<arr.length;i++ 阅读全文
posted @ 2020-06-30 11:38 2020小白 阅读(1737) 评论(0) 推荐(0)