In HashTable I am storing null value..then what is the
error it will show
Answer Posted / 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 |
Post New Answer View All Answers
What state does a thread enter when it terminates its processing?
What class is the top of the awt event hierarchy?
Name three subclasses of the component class?
What is the relationship between the canvas class and the graphics class?
What are the different methods of identifying an object?
What is bean? Where can it be used?
What are the different types of exception?
What do you mean by Socket Programming?
Which textcomponent method is used to set a textcomponent to the read-only state?
What is the difference between system.out ,system.err and system.in?
What are the different algorithms used for clustering?
Explain phantom read?
Why do threads block on i/o?
how to make a index.jsp for running the site in internet and find an error for connection with weblogic server and java that give an error invalid object name.and how to maintain session.
What are the design considerations while making a choice between using interface and abstract class?