Is Java Class Threadsafe ????? How to make Java class Thread
safe??

Answers were Sorted based on User's Feedback



Is Java Class Threadsafe ????? How to make Java class Thread safe??..

Answer / bojjanna

By Default java class a not tread safe, i we make a tread
safe we have three ways

1) avoiding the instance variables
2) by using Sycrinization
3) by using Syncronize block

Is This Answer Correct ?    19 Yes 1 No

Is Java Class Threadsafe ????? How to make Java class Thread safe??..

Answer / divya

using synchronization,immutable objects,thread safe wrappers

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Core Java Interview Questions

Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?

0 Answers   HCL,


What is boolean query?

0 Answers  


What is the difference between instanceof and isinstance?

0 Answers  


What is type parameter in java?

0 Answers  


What is the difference between the paint() and repaint() methods in java programming?

0 Answers  


What is meant by JVM? Is JVM platform independent or not?

0 Answers   Wipro,


What do you mean by compiler?

0 Answers  


What is t type java?

0 Answers  


List interface?

2 Answers  


What is the purpose of the System class?

0 Answers  


What does arrays sort do in java?

0 Answers  


Write a program to search a number in the given list of numbers.

0 Answers   Honeywell,


Categories