File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -4,20 +4,20 @@ public class ArrayPrimitivos {
44
55 public static void main (String [] args ) {
66
7- int [] numeros ; //também pode ser dessa forma: int numeros [];
8- String [] nomes = new String [3 ]; //precisa ser inicializado com um valor
7+ int [] numeros1 ; //também pode ser dessa forma: int numeros1 [];
8+ int [] numeros = new int [3 ]; //precisa ser inicializado com um valor
99
10- nomes [0 ] = "emanoel" ;
11- nomes [1 ] = "campos" ;
12- nomes [2 ] = "viana" ;
10+ numeros [0 ] = 9 ;
11+ numeros [1 ] = 7 ;
12+ numeros [2 ] = 13 ;
1313
14- String meuNome = nomes [0 ];
14+ int meuNumero = numeros [0 ];
1515
16- System .out .println (meuNome );
17- System .out .println (nomes .length );
16+ System .out .println (meuNumero );
17+ System .out .println (numeros .length );
1818
19- for (int i = 0 ; i < nomes .length ; i ++) {
20- System .out .print (nomes [i ] + " " );
19+ for (int i = 0 ; i < numeros .length ; i ++) {
20+ System .out .print (numeros [i ] + " " );
2121 }
2222
2323 }
You can’t perform that action at this time.
0 commit comments