ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
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?
 Question Submitted By :: Ravi
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
no.. final cannot be modified..
 
Is This Answer Correct ?    1 Yes 1 No
Cool_duzz
 
  Re: 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
# 2
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 ?    4 Yes 1 No
Kr
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
what is the replacement for GOTO in java? CTS2
what is the difference between java and j2ee... is that can i work j2ee on net beans IDE 6.0  2
What method is used to compare two strings ?  4
Can a lock be acquired on a class?  2
how cani read a command line argument?(usingfile object).  3
Can we declare an anonymous class as both extending a class and implementing an interface? Wipro7
How will you create the class for the following scenario? Employees under one employee? Bally-Technologies2
is there any function in java to make the text to blink?  5
A abstract class extending an abstract class.Super class has both abstract and non-abstract methods.How can we implement abstract and non-abstract mehtods? Explain with snippet  3
Name the methods that used to get and set the text label displayed by a Buttonobject?  1
What is advantage of using threads? BMC2
what is Portal(web based online portal)? AIG1
How to find the size of an array a)array.length() b)array.length c)array.size() d)array.size Accenture6
What is left shift and right shift?  1
Given: 1. package test; 2. 3. class Target { 4. public String name = “hello”; 5. } What can directly access and change the value of the variable name? 1 any class 2 only the Target class 3 any class in the test package 4 any class that extends Target  3
Can a double value be cast to a byte?  3
How to override a equals() method and what is the use?  1
How u dubugg ur project? iFlex1
Is it compulsory to have atleast one abstract method in abstract class?  7
Can Applet have constructors?  3
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com