Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


In HashTable I am storing null value..then what is the
error it will show

Answers were Sorted based on User's Feedback



In HashTable I am storing null value..then what is the error it will show..

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

In HashTable I am storing null value..then what is the error it will show..

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

Post New Answer

More Advanced Java Interview Questions

what is disadvantage of thread?

3 Answers   HCL,


How would you detect a keypress in a jcombobox?

0 Answers  


What are the oops concept?

0 Answers  


whats is mean by jndi

1 Answers   SolutionNET,


What is a class loader?

5 Answers  


How do you iterate in Hashmap?

1 Answers   HCL, Infotech,


How many layers are there in RMI and what are they?

1 Answers  


Difference between hashmap and hashtable?

0 Answers  


Is it possible to stop the execution of a method before completion in a sessionbean?

0 Answers  


What are the JSP implicit objects ?

1 Answers   eMids,


Do I need to import javlang package any time? Why ?

0 Answers  


life cycle of an applet?

3 Answers  


Categories