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

int x=5,i=1,y=0; while(i<=5) { y=x++ + ++x; i=i+2; } System.out.println(x); System.out.println(y); System.out.println(i); How to solve this? Please explain!

1619


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

792


What are the services in RMI ?

2116


Will the general public have access to the infobus apis?

818


Name the eight primitive java types.

852


To identify IDL language what mapping mechanism is used?

3686


Is the session factory thread safe?

944


What is aop(assepct oriented programing)?

818


What is a class loader?

1068


How can I scroll through list of pages like the search results in google?

790


What if the static modifier is removed from the signature of the main method?

1001


What class is the top of the awt event hierarchy?

861


How to implement dphibernate to activate lazy loading in Flex with java ?thanx in advance!

2804


Explain how will the struts know which action class to call when you submit a form?

743


What are JTA/JTS and how they used by client?

1982