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
We are seeing so many videos/audios as many web sited. But question is these videos or audios are stored in Databases ( Oracle, Mysql, Sybase,... ) or stored any file directory from there they will give the link for that? Pls explain and give sample code to achieve this one? Thanks, Seenu.
Can you explain the cs option of java interpreter?
Which sort is best in java?
Can a class be a super class and a sub-class at the same time? Give example.
Where are the local variables stored?
Why method overriding is used?
Does substring create a new object?
What is the benefit of using enum to declare a constant?
What is a function easy definition?
Explain aggregation in java?
How can you set the applet size?
Explain garbage collection in java?
What is collections framework?
What is a modifier?
How does hashmap work in java ?