Hi! I'm new to Java.
I need to make an array like:
int b[] = {0,1,2,3,4,5,6,7,8,9};
Is it possible to use a loop to generate an array like that?
I don't know if I'm asking the right question, so I will try to explain it:
class test0{
int a=0;
public test0(){
int b[]={
for(int i=0;i<10;i++){
a++;
}
};
}
public static void main(String args[]){
new test0();
}
}
Thanks a lot in advance.