i have done this part to add listen names...
package assignment;

import javax.swing.JOptionPane;


public class Main {


    public static void main(String[] args) {

   String name[];
   int size=Integer.parseInt(JOptionPane.showInputDialog("how many
names?"));
   name=new String[size];
   for(int i=0;i<name.length;i++)

       name[i]=JOptionPane.showInputDialog("name of of "+(i
+1)+""+size);

   for(int i=0;i<name.length;i++)
   System.out.print(name[1]+"\t");
   System.out.println();
   for(int i=0;i<name.length;i++)

       for(int j=0;j<name.length;j++)
           if(name[j].compareTo(name[j+1])>0){

               String temp=name[i];
               name[j]=name[j+1];
               name[j+1]=temp;
   }

           for(int i=0;i<name.length;i++)
               System.out.println(name[i]+"\t");


    }

}

this was in the main method,now i need small method to search after
the names i did enter, another method to copy or delete..i wil try to
put my work here if i see anyone want to help me....

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to