We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0cd96eb commit 8736eddCopy full SHA for 8736edd
1 file changed
src/module1/arrays/ArrayPrimitivos.java
@@ -0,0 +1,24 @@
1
+package module1.arrays;
2
+
3
+public class ArrayPrimitivos {
4
5
+ public static void main(String[] args) {
6
7
+ int[] numeros; //também pode ser dessa forma: int numeros[];
8
+ String[] nomes = new String[3]; //precisa ser inicializado com um valor
9
10
+ nomes[0] = "emanoel";
11
+ nomes[1] = "campos";
12
+ nomes[2] = "viana";
13
14
+ String meuNome = nomes[0];
15
16
+ System.out.println(meuNome);
17
+ System.out.println(nomes.length);
18
19
+ for(int i = 0; i < nomes.length; i++) {
20
+ System.out.print(nomes[i] + " ");
21
+ }
22
23
24
+}
0 commit comments