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 the main functionality of RRL(Remote Reference Layer)?

3 Answers  


What is the difference between the font and fontmetrics classes?

0 Answers  


Howmany interfaces are used in RMI?

2 Answers  


Can you give me a simple example of using the requiredif validator rule?

0 Answers  


What is JNI?

1 Answers   Google, TCS,


whats is mean by tiles in struts

2 Answers   SolutionNET,


whats is mean by connectionpooling

0 Answers   SolutionNET,


How many JSP scripting elements and what are they?

4 Answers   TCS,


Will it be called overriding if I do not change the parameters or return type, instead throw a different exception in the method signature.

4 Answers   HeadStrong,


what are memory considerations of jsp compares to other web components?

0 Answers   TCS,


What is table mutation and how do you avoid it?

0 Answers  


Can you control when passivation occurs?

0 Answers  


Categories