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...

Hi Friends, Can u give few interview questions which relates
ArrayList and Hashmap. I mean how to link ArrayList and
HashMap.I know this is not good way of asking questions like
this , but i need

Answer Posted / murali,25@gmail.com

HashMap stores key-value pairs. Alternate approach is to have a plain java class with key,value as attributes.
class HashMapAlternate{
Object key;
Object value;
}

You can create objects of HashMapAlternate and store it in arraylist. But HashMap is a better solution because it uses hashing and collision resolution technique which speeds up lookup when number of objects are very large.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the init method?

909


Explain how to force the garbage collection in java.

923


List some java keywords sun like c, c + + keywords?

960


What is the meaning of find and replace?

970


Which methods cannot be overridden in java?

922


Can we use both this () and super () in a constructor?

961


What is the purpose of the runtime class in java programming?

1010


Explain thread in java?

1089


Define the term string pool?

950


What is the locale class in java programming?

998


What is the difference between Java and C++?

1118


What is style and indentation?

952


What are implicit objects in java?

931


make a method which any number and any type of argument and print sum of that arguments.....

1747


I want my class to be developed in such a way that no other class (even derived class) can create its objects. Define how can I do so?

1115