-   
- import static java.lang.System.out; 
- import java.util.Scanner; 
-   
- class nodito 
- { 
-     String info; 
-     nodo liga; 
- } 
-   
- public class Lista 
- { 
- public static void main(String args[]) 
-     { 
-         Scanner pide=new Scanner(System.in); 
-         int opc; 
-          
-         nodito P=new nodito(); 
-         out.println("Primer elemento a insertar\n\t(ultimo de la lista):"); 
-         P.info=pide.next(); 
-         P.liga=null; 
-               
-         do{ 
-             out.println("1.- Inserta otro elemento.\n2.- Mostrar lista.\n3.- Sal de la insercion."); 
-          opc=pide.nextInt(); 
-             switch(opc){ 
-             case 1:                
-             nodito Q=new nodito(); 
-             out.println("Dame la informacion:"); 
-             Q.info=pide.next(); 
-             Q.liga=P.liga; 
-             P=Q; 
-   
-             break; 
-              
-             case 2: 
-                 out.println(P.info+"\t"+Q.info);// esta linea me da el error 
-                     } 
-     }while(opc!=3); 
-   
- } 
-