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 |
What is the difference between the session.get() method and the session.load() method?
Name the eight primitive java types.
What are synchronized methods and synchronized statements?
what is the Remote Stub?
What will happens, when a thread cannot acquire a lock on an object?
Why doesn’t the focus feature on the tag work in every circumstance?
Define the remote object implementation?
How many JSP scripting elements and what are they?
What is MOM?
What is the purpose of the notifyall() method?
what is heepStored?
What modifiers may be used with an inner class that is a member of an outer class?