Iterator in the HashMap is fail-safe means what?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is java based on c?

539


Why strings in java are called as immutable?

594


Why java is considered dynamic?

758


What is jvm? How its run?

665


What restrictions are placed on method overloading?

614






What is java virtual machine and how it is considered in context of java’s platform independent feature?

657


What is java argument list?

522


Which category the java thread do fall in?

575


Where is java located?

501


What is internal variable?

540


What are bind parameters?

555


why are there separate wait and sleep methods? : Java thread

580


Can a set contain duplicates?

521


What is the use of put method?

520


How many types of constructors are used in java?

543