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


Please Help Members By Posting Answers For Below Questions

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

600


What class is the top of the awt event hierarchy?

570


Name three subclasses of the component class?

610


What is the relationship between the canvas class and the graphics class?

535


What are the different methods of identifying an object?

567






What is bean? Where can it be used?

575


What are the different types of exception?

568


What do you mean by Socket Programming?

543


Which textcomponent method is used to set a textcomponent to the read-only state?

625


What is the difference between system.out ,system.err and system.in?

594


What are the different algorithms used for clustering?

545


Explain phantom read?

1733


Why do threads block on i/o?

676


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.

1746


What are the design considerations while making a choice between using interface and abstract class?

540