What is thread safe java?
Answer / Kumar Alok Rajan
In Java, a thread-safe object or method can be used concurrently by multiple threads without causing interference or data inconsistency. Some examples of thread-safe classes in Java are `Vector`, `Hashtable`, and `synchronized` methods and blocks.
| Is This Answer Correct ? | 0 Yes | 0 No |
4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (
There are 2 different ways to create an object. a)By using keyword "new" b)By using Class.forName ("className").newInstance(); What is the difference between these 2 methods.
Which number is denoted by leading zero in java?
how to run servlet program between two computer through the internet ?
2 Answers Kiran Prakashan, TCS,
What is autoboxing in java?
What is an escape character in java?
Why map is used in java?
what is check p object in java
What does singleton class mean?
Difference between operator overloading and function overloading
1 Answers Tavant Technologies, Virtusa,
What is string in java with example?
Explain illegalmonitorstateexception and when it will be thrown?