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 happens when we invoke a thread?s interrupt method while it is in sleeping or waiting condition?
What is RMI architecture?
What is metaspace?
What are the different algorithms used for clustering?
What is a tasks priority and how is it used in scheduling?
i want documentation of text file splitter & merger of advanced java
what is the diffrence between banking and insurance domain?
What is in-memory replication?
what is a dirty read?
whats is mean by filter?
Explain Life cycle of Servlet Filter.
2 Answers InfoBrain, ITC Infotech,
What is the difference between the ‘font’ and ‘fontmetrics’ class?