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

How many bytes is string in java?

1146


Is java type safe?

914


Define "Access specifiers" in java.

1120


Can we have return statement in finally clause? What will happen?

912


What is the final field modifier?

929


Can you explain the usages of class.forname()?

1013


What is not object oriented programming?

871


How do you ensure that n threads can access n resources without deadlock?

1256


What is a byte array?

1047


What carriage return means?

908


What is r in java?

996


What is the difference between error and an exception?

1058


Is minecraft java edition free?

1064


How does singleton class work?

925


Can a static method be final?

1004