Showing posts with label List of Persons Using ArrayList in Java. Show all posts
Showing posts with label List of Persons Using ArrayList in Java. Show all posts

Thursday, April 5, 2018

List of Persons Using ArrayList in Java

I am currently studying data structures in Java one of the basic data structure in ArrayList. What does the program will do is to list down all the name of the person that we declare in our program.

I am currently accepting programming, IT consulting work and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.



Sample Program Output


Program Listing

ArrayCollection.java

    import java.util.*;  
    
class ArrayCollection{  

       public static void main(String args[])
    {  
ArrayList <String> list= new ArrayList <String>();
    list.add("Jake R. Pomperada");
                list.add("Lydia R. Pomperada");  
list.add("Virgilio V. Pomperada");  
                list.add("Ma. Junallie F. Pomperada");  
                list.add("Jacob Samuel F. Pomperada");  
list.add("Julianna Rae F. Pomperada");  
list.add("Felipe C. Fuentebella Jr.");  
list.add("Salvacion E. Fuentebella ");  
              
      Iterator loop=list.iterator();  
      
  System.out.println("\n");
  System.out.print("List of Persons Using ArrayList");
  System.out.println("\n");
  while(loop.hasNext()){  
       System.out.println(loop.next());  
      }  
  System.out.println("\n");
  System.out.println("End of Program");
  System.out.println("\n\n");
     }  
    }