-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTesteMATRIZESeVETORES.java
More file actions
26 lines (22 loc) · 1015 Bytes
/
TesteMATRIZESeVETORES.java
File metadata and controls
26 lines (22 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import java.util.ArrayList;
import java.util.List;
public class TesteMATRIZESeVETORES {
public static void main(String[] args) {
//vetor--> armazena uma quantidade de informações determinadas por você
String[] listaDeInformacoes=new String[5];
listaDeInformacoes[0]="Detergente";
listaDeInformacoes[1]="Chocolate";
listaDeInformacoes[2]="Sucrilhos";
listaDeInformacoes[3]="Arroz";
listaDeInformacoes[4]="Bacon";
System.out.println(listaDeInformacoes[0]+" "+listaDeInformacoes[4]);
//matriz--> armazena uma quantidade de informações indeterminadas(infinitas)
List<String> listaDeInformacoesb= new ArrayList<>();
listaDeInformacoesb.add("carteira");
listaDeInformacoesb.add("bone");
listaDeInformacoesb.add("lapis");
listaDeInformacoesb.add("mouse");
listaDeInformacoesb.add("oculos");
listaDeInformacoesb.add("lente");
System.out.println(listaDeInformacoesb);
}}