Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

In HashTable I am storing null value..then what is the
error it will show

Answers were Sorted based on User's Feedback

In HashTable I am storing null value..then what is the error it will show..

Answer / mvteja

Hashtable does not contain null value. if v try to store
null value, v will get the following error.

F:\Test>javac -d .

F:\Test>java a.b.c.Test
Exception in thread "main" java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at a.b.c.Test.<init>(
at a.b.c.Test.main(


Is This Answer Correct ?    16 Yes 0 No

In HashTable I am storing null value..then what is the error it will show..

Answer / karthik

Normally hastable doen't allow null value, it will through
run time exception like NullPointerException

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Advanced Java Interview Questions

Hi I have joined java course. I also want additional help from any tutorials website. Please suggest me tutorials which provides easy to understand online applet tutorials?

0 Answers  

Do I need to import javlang package any time? Why ?

0 Answers  

What are the disadvantages of using threads?

3 Answers   Oracle, SFS,

What state does a thread enter when it terminates its processing?

0 Answers  

Dear freinds... I want to know how to write self mapping for a table using hibernate?

1 Answers   Cap Gemini,

What is a class loader?

0 Answers  

whats is mean by class.forName() whats the return type of class

6 Answers   SolutionNET,

What is clustering? What are the different algorithms used for clustering?

0 Answers  

Why does the option tag render selected=selected instead of just selected?

0 Answers  

Hello, I'm java developer. My skill is programming with java,jsp, struts, struts2+spring, hibernate, eclipse, tomcat, mysql,Oracle,Middlegen and other open source technology. I'm interest work any web base project that use my ability above. The thing is that I have never got any chance to work in this field though i am very much comfort with my skills. So if any body want me then i will happily join you. Also I have also some of my friends if you. If you interest to outsource any project to me then also you are welcome. you can reach me by email at

4 Answers  

What is servlet preinitialization?

3 Answers   iFlex,

What is the O/P of the below Code Snippet ? And how does it imply the concept of call-by-value/call-by-reference. (Note : Pls ignore syntx errors) public class One { sop ("Into One--"); } public class Two extends One{ sop ("Into Two--"); } public class Home { One a; Two t; public static void main(argv[]) { sop ("In Home--"); sop(One.a); sop(Two.a); sop(One.t); sop(Two.t); } }

2 Answers   Wipro,