Can constructor be synchronized?
Answer / Neeraj Semwal
Yes, constructors in Java can be declared synchronized to ensure that only one instance of an object can be created at a time. However, it's not commonly used as it can lead to performance issues due to the overhead of synchronization.
| Is This Answer Correct ? | 0 Yes | 0 No |
what are the methods of an object class?
Can java inner class be static?
How to create a thread in java?
What are the different types of java?
Highest level event class of the event-delegation model?
What is a byte string?
How do you remove duplicates in java?
What is the diffrence between inner class and nested class?
How to display names of all components in a Container?
Define jre i.e. Java runtime environment?
what is the use of abstract class?
3 Answers Amdocs, Atos Origin, Invictus,
What is treemap in java?