Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class main { //lista
- public static void main(String[] args){
- Lista lis = new Lista();
- Node n1 = new Node();
- Node n2 = new Node();
- Node n3 = new Node();
- n1.setValor(5);
- n2.setValor(15);
- n3.setValor(55);
- lis.insereInicio(n1);
- lis.insereFim(n2);
- lis.insereInicio(n3);
- if(lis.busca(5))
- System.out.println("O valor foi achado.\n");
- else
- System.out.println("Valor não encontrado.\n");
- System.out.println("Lista:");
- lis.toString();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement