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
How many bytes is string in java?
Is java type safe?
Define "Access specifiers" in java.
Can we have return statement in finally clause? What will happen?
What is the final field modifier?
Can you explain the usages of class.forname()?
What is not object oriented programming?
How do you ensure that n threads can access n resources without deadlock?
What is a byte array?
What carriage return means?
What is r in java?
What is the difference between error and an exception?
Is minecraft java edition free?
How does singleton class work?
Can a static method be final?