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...


Iterator in the HashMap is fail-safe means what?

Answers were Sorted based on User's Feedback



Iterator in the HashMap is fail-safe means what?..

Answer / amol

The iterators for the concrete collection implementations
are fail-fast.
That means that if you are using an Iterator to traverse a
collection while underlying collection is being modified by
another thread, then the Iterator fails immediately by
throwing a ConcurrentModificationException (another
RuntimeException). That means the next time an Iterator
method is called, and the underlying collection has been
modified, the ConcurrentModificationException exception gets
thrown.

Is This Answer Correct ?    59 Yes 2 No

Iterator in the HashMap is fail-safe means what?..

Answer / namy

Fail-safe is relevant from the context of iterators. If an iterator has been created on a collection object and some other thread tries to modify the collection object "structurally”, a concurrent modification exception will be thrown. It is possible for other threads though to invoke "set" method since it doesn’t modify the collection "structurally”. However, if prior to calling "set", the collection has been modified structurally, "IllegalArgumentException" will be thrown.

Is This Answer Correct ?    19 Yes 2 No

Iterator in the HashMap is fail-safe means what?..

Answer / parthasarathi

can you please tell me about the use of marker interface?


Ans: Marker or taged interfaces having no methods.example
Cloneable,Serializable etc.Actually this interfaces give
some infermation about a object.that means internally it
check the object wheather it belongs to that interface or
not,using instanceOf() methd.

Is This Answer Correct ?    5 Yes 7 No

Iterator in the HashMap is fail-safe means what?..

Answer / yathirajulu

fail-safe means, The ability of a system to fail but not
produce a catastrophic result.

Is This Answer Correct ?    4 Yes 11 No

Iterator in the HashMap is fail-safe means what?..

Answer / guest

ok i got. but what is fail-safe? i want meaning?

Is This Answer Correct ?    0 Yes 12 No

Iterator in the HashMap is fail-safe means what?..

Answer / sandya

ok Thanq Yathirajulu.

Is This Answer Correct ?    0 Yes 12 No

Iterator in the HashMap is fail-safe means what?..

Answer / deepak divvela

i know this thing only,please ignore if it is wrong.
that is hashmap will have only key/value pair.
but iterator will not get key/value pairs at a time.
so for that reason hashmap is fails.

Is This Answer Correct ?    0 Yes 21 No

Iterator in the HashMap is fail-safe means what?..

Answer / yathirajulu

HashMap is fail-safe is nothing but, 'security' for store
null values to extent forward

Is This Answer Correct ?    2 Yes 31 No

Iterator in the HashMap is fail-safe means what?..

Answer / yathirajulu m

because, HashMap allows null values so, it is fail-safe.

Is This Answer Correct ?    11 Yes 44 No

Post New Answer

More Core Java Interview Questions

Explain the difference between map and flatmap stream operation?

0 Answers  


What is an array and a vector? How they different from each other?

4 Answers  


What is the differenc between Enemuration interface and iterator interface according to accessing?

4 Answers  


What is the use of default method in interface in java? Explain

0 Answers  


How many bits is a string?

0 Answers  


What are the four corner stones of oop?

0 Answers  


what is difference between type 4 driver and type 1 driver?

2 Answers   CMC, CTS, IBM, JK Technosoft, Napier Healthcare,


What is parsing in grammar?

0 Answers  


Can a variable be local and static at the same time?

0 Answers  


What is 3-tier model?

3 Answers   Wipro,


What is the use of TL?

0 Answers  


Explain about fail safe iterators in java?

0 Answers  


Categories