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

They had given one progam
final HashMap hm=new HashMap();
public void show()
{
hm.put("name",value);
}
in this prg here the final hashtable value can be changed in
put method,its the prg run?

Answer Posted / kr

hash map values can be modified but the hashmap object
cannot be modified
hm.put("name",value); //allowed

hm = new HashMap() // throw error since the object is fianl

Is This Answer Correct ?    19 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What environment variables are required to be set on a machine in order to run Java programs?

1189


Is ++ operator is thread safe in java?

955


What is a key in java?

978


State some situations where exceptions may arise in java?

1052


What is a java applet? What is an interface?

1096


Can we have multiple catch block for a try block?

1018


Explain hashset and its features?

1149


how to prepare for IT Officers Interview in Banks

1970


What is difference between filereader and bufferedreader?

954


Is void a keyword in java?

1014


What are filterstreams?

1076


Why to use nested classes in java?

1118


What does += mean coding?

933


How many ways can an argument be passed to a subroutine and explain them?

1026


What is the difference between size and length in java?

975