In HashTable I am storing null value..then what is the
error it will show
Answers were Sorted based on User's Feedback
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 . Test.java
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>(Test.java:18)
at a.b.c.Test.main(Test.java:27)
F:\Test>
| Is This Answer Correct ? | 16 Yes | 0 No |
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 |
How database connectivity in XML is achieved?
What state does a thread enter when it terminates its processing?
For which statements does it make sense to use a label?
What is mdb and what is the special feature of that?
Explain what is synchronization?
What is the immediate superclass of the applet class?
How to send a request to garbage collector?
Why do I get a duplicate name error when loading a jar file?
what is difference between object state and behaviour?
what is an isolation level?
What class is used to create Server side object ?
If your ui seems to freeze periodically, what might be a likely reason?