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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why can we not override static method?

821


How many bytes are there?

737


Give few examples of final classes defined in Java API?

886


Can a method inside a interface be declared as final?

708


Can we have multiple public classes in a java source file?

770


Explain the difference between a Thread and a Process.

766


What advantage do java's layout managers provide over traditional windowing systems?

735


Explain method overloading?

744


What is the difference between class & object?

750


What is a void method java?

704


Can we write class inside a class in java?

731


How can we run a java program without making any object?

742


What is the difference between preparedstatement and statement in java?

790


What is the difference between == and === javascript?

793


What are the methods of object class ?

766