PRIMER PROGRAMA MERALY


/**
 * @(#)uno.java
 *
 *
 * @author
 * @version 1.00 2014/3/3
 */
import java.util.*;
import java.io.*;
import javax.swing.JOptionPane;
import javax.swing.*;
public class uno {
 public static void main (String[] args)
    {
    ArrayList a = new ArrayList( );
    int ax ;
    a.add(JOptionPane.showInputDialog(null, "¿Qué color deseas?"));
    int u = 0;
       
        while (u == 0)
        {
        ax = JOptionPane.showConfirmDialog(null, "¿Deseas ingresar un nuevo color?");
        if(ax == JOptionPane.YES_OPTION)
        a.add(JOptionPane.showInputDialog(null, "¿Qué color deseas?"));
        else
        break;
        }
     
for (int i=0;i<a.size() ;i++)
System.out.println(a.get(i) + " " );
}
    }
/** by meraly mendoza castelan */

No hay comentarios:

Publicar un comentario