Sunday, February 25, 2018

Java Program : Illustratingconcept of 'Collections' in java

import java.util.*;

class Collection_ArrayList_1
{  
    public static void main(String[] args)
    {
     ArrayList al =new ArrayList();
     al.add("Ashutosh");
     al.add(123);
     al.add("kumar");
     al.add(143);
     System.out.println(al);
     }
   
}

Thanks
Happy Programming!

No comments:

Post a Comment

How can I run a C++ program directly from Windows?

How-can-I-run-a-C-program-directly-from-Windows