Advertisement
Guest User

Untitled

a guest
Feb 16th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.74 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package Ejercicio1;
  7.  
  8. /**
  9.  *
  10.  * @author Yeray
  11.  */
  12. public class Nodo {
  13.    
  14.     private Nodo siguiente;
  15.     private int elemento;
  16.    
  17.     public Nodo (int elem, Nodo sig){
  18.    
  19.         elemento = elem;
  20.         siguiente= sig;
  21.     }
  22.    
  23.     public int getElemento(){
  24.    
  25.         return elemento;
  26.     }
  27.    
  28.     public Nodo getSig(){
  29.    
  30.         return siguiente;
  31.     }
  32.    
  33.     public void setElemento(int elem){
  34.    
  35.         elemento = elem;
  36.     }
  37.    
  38.     public void setSiguiente(Nodo sig){
  39.    
  40.         siguiente = sig;
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement