Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Difference between array and arraylist.

Answer Posted / sakshi jauhari

Arraylist is written as
ArrayList<String> arr= new ArrayList<String>();
whereas array is specified for a single data type object
only like..
int[] ar = new int[6];

Arraylist can be specified for any data type object that it
can store.
its range can also be resized which is not possible in
array.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the methods used to implement for the key object in the hash map?

1043


Can we create a class inside a class in java?

1082


What is a nested structure?

1042


What is the difference between member variables initialization and assignment in a constructor?

1277


Can a top level class be private or protected?

1057


What is the basic difference between string and stringbuffer object?

1088


What is the base class of all exception classes in java?

1058


Can we have multiple catch block for a try block?

1019


Does java have extension methods?

982


If I only change the return type, does the method become overloaded?

926


Which programming language is best in future?

964


Is class forname reflection?

990


What does localhost mean?

953


What is keyword auto for?

1186


Explain spliterator in java8?

1049