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


which of tha following is not a thread safe class?
a) ArrayList b)Vector c)HashTable d)None

Answers were Sorted based on User's Feedback



which of tha following is not a thread safe class? a) ArrayList b)Vector c)HashTable d)None..

Answer / ragubir singh

ArrayList

Is This Answer Correct ?    16 Yes 0 No

which of tha following is not a thread safe class? a) ArrayList b)Vector c)HashTable d)None..

Answer / divya.c

a)ArrayList

Is This Answer Correct ?    12 Yes 1 No

which of tha following is not a thread safe class? a) ArrayList b)Vector c)HashTable d)None..

Answer / gunjan

ArrayList is,unsynchronized, not thread safe, vectors r
thread safe and synchronized
if u want to make Arraylist as thread safe, should use
Collections class synchronizedList(List) method

Is This Answer Correct ?    11 Yes 0 No

which of tha following is not a thread safe class? a) ArrayList b)Vector c)HashTable d)None..

Answer / samir vasani

a)ArrayList
Because ArrayList is not a synchronized ,means it is not a
thread safe

Is This Answer Correct ?    6 Yes 0 No

which of tha following is not a thread safe class? a) ArrayList b)Vector c)HashTable d)None..

Answer / arjunkumar

Hey Guys n girls...
If you know the Answer Exactly den only post it, V dont want
Guess Answers as wel as Funny Ans, this is the site for not
fun, got it.

Is This Answer Correct ?    5 Yes 2 No

which of tha following is not a thread safe class? a) ArrayList b)Vector c)HashTable d)None..

Answer / anonymous

hay submitted guy dun be angry!All person have their own view and assumption.
My answer is ArrayList.

Is This Answer Correct ?    1 Yes 0 No

which of tha following is not a thread safe class? a) ArrayList b)Vector c)HashTable d)None..

Answer / sai

ArrayList is not Thread Safe Class.Because it is not
Synchronized.

Is This Answer Correct ?    1 Yes 0 No

which of tha following is not a thread safe class? a) ArrayList b)Vector c)HashTable d)None..

Answer / soujanya

Arraylist is not threadsafe.

Is This Answer Correct ?    1 Yes 0 No

which of tha following is not a thread safe class? a) ArrayList b)Vector c)HashTable d)None..

Answer / aravinda reddy

ArrayList is by default not thread safe, but we can make it
thread safe. Below is the example how we can make it thread
safe.

public class SynchronizeList {
public static void main(String[] args) {

ArrayList<String> al=new ArrayList<String>
();
al.add("1");
al.add("2");
al.add("3");

//we can make the synchronized
Collections.synchronizedList(al);

synchronized(al) {
Iterator i = al.iterator(); // Must
be in synchronized block
while (i.hasNext())
System.out.println(i.next());
}
}
}

Vector and HashTable are by default synchronized. These are
thread safe.

Hence the answer is ArrayList.

Is This Answer Correct ?    1 Yes 0 No

which of tha following is not a thread safe class? a) ArrayList b)Vector c)HashTable d)None..

Answer / divya

None

Is This Answer Correct ?    6 Yes 6 No

Post New Answer

More Core Java Interview Questions

What is static import in java?

0 Answers  


What is the final variable?

1 Answers  


Given: 1. package test; 2. 3. class Target { 4. public String name = “hello”; 5. } What can directly access and change the value of the variable name? 1 any class 2 only the Target class 3 any class in the test package 4 any class that extends Target

7 Answers   Infosys, WW,


What is keyword and identifier?

0 Answers  


What is yield () in java?

0 Answers  


How to instantiate static nested classes in java?

0 Answers  


Is java free for businesses?

0 Answers  


What are the five major types of reference sources?

0 Answers  


What is parseint?

0 Answers  


Why strings in java are called as immutable?

0 Answers  


Can u write constructor in abstract.If yes den when it will be invoked.

4 Answers   SunGard,


What is anti pattern in java?

0 Answers  


Categories