We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44caac3 commit 2e4c454Copy full SHA for 2e4c454
src/module4/equals/lists/TesteLinkedList.java
@@ -0,0 +1,30 @@
1
+package module4.equals.lists;
2
+
3
+import java.util.LinkedList;
4
+import java.util.List;
5
6
+public class TesteLinkedList {
7
8
+ public static void main(String[] args) {
9
10
+ List<String> lista = new LinkedList<>();
11
12
+ String nome = new String("emanoel");
13
+ lista.add(nome);
14
15
+ String sobrenome = new String("campos");
16
+ lista.add(sobrenome);
17
18
+ String nomeIgual = new String("emanoel");
19
20
+ boolean igual = nome.equals(sobrenome);
21
+ System.out.println(igual);
22
23
+ boolean existe = lista.contains(nomeIgual);
24
+ System.out.println(existe);
25
26
+ for (String nomes : lista) {
27
+ System.out.println(nomes);
28
+ }
29
30
+}
0 commit comments