Is Java Class Threadsafe ????? How to make Java class Thread
safe??
Answers were Sorted based on User's Feedback
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 |
Answer / divya
using synchronization,immutable objects,thread safe wrappers
| Is This Answer Correct ? | 0 Yes | 1 No |
What is static data type in java?
How do you do absolute value in java?
How is the marker interface used in Java?
Explain the difference between map and flatmap stream operation?
When a thread is executing a synchronized method , then is it possible for the same thread to access other synchronized methods of an object ?
What is the purpose of sizeof operator?
How to find the given number is a prime number or not by getting input from the user
Why singleton class is used in java?
Why are global variables used?
1.) if we use "private" in place of "public" in public static void main()... 2.) if we use "int" in place of "void".... 3.) can we ommit "static" keyword from that statement.... 4.) also can we give the command line arguments type as int type or float,etc.(.i.e (string args[]))
What about instanceof operator in java?
How to override a equals() method and what is the use?