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 environment variables are required to be set on a machine in order to run Java programs?
Is ++ operator is thread safe in java?
What is a key in java?
State some situations where exceptions may arise in java?
What is a java applet? What is an interface?
Can we have multiple catch block for a try block?
Explain hashset and its features?
how to prepare for IT Officers Interview in Banks
What is difference between filereader and bufferedreader?
Is void a keyword in java?
What are filterstreams?
Why to use nested classes in java?
What does += mean coding?
How many ways can an argument be passed to a subroutine and explain them?
What is the difference between size and length in java?