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
What is the difference between multiple processes and multiple threads?
How do you add an arraylist to an array in java?
What is the difference between the direct buffer and non-direct buffer in java?
What is data type modifier?
What language is an assembler written in?
Can we overload destructor in java?
Why do I need to declare the type of a variable in java?
What are 5 boolean operators?
Is it necessary for the port addresses to be unique? Explain with reason.
Can list be null in java?
What is the argument in java?
Is void a data type in java?
Explain what are final variable in java?
what do you mean by classloader?
What is a website container?