Skip to content

Commit b8aff98

Browse files
committed
array de referências
1 parent 734bd57 commit b8aff98

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package module1.arrays;
2+
3+
public class ArrayReferencias {
4+
5+
public static void main(String[] args) {
6+
7+
String[] nomes = new String[5]; //objetos
8+
9+
String primeiroNome = new String("emanoel");
10+
nomes[0] = primeiroNome;
11+
12+
String segundoNome = new String("campos");
13+
nomes[1] = segundoNome;
14+
15+
System.out.println(nomes[0].toUpperCase() + " " + nomes[1].toUpperCase());
16+
}
17+
}

0 commit comments

Comments
 (0)