标签:class for yar int main ring style public ++
1 public class arr{ 2 int []arr; 3 public arr(int a) { 4 this.arr = new int[10]; 5 for(int x= 0;x<a;x++) { 6 arr[x]=x+2; 7 } 8 } 9 10 11 public static void main (String []args){ 12 arr1 myarr =new arr1(10); 13 for(int x:myarr.arr) { 14 15 System.out.print(x); 16 17 } 18 19 20 } 21 22 23 }
标签:class for yar int main ring style public ++
原文地址:https://www.cnblogs.com/Dai-py/p/10763437.html