No. We cannot mark a constructor as synchronized.
This will lead to compiler error.
The reasoning behind this is that, in this case, only the constructing
thread would have access to the object being constructed
xxxxxxxxxx
public class SynchronizedConstructorTest {
// declaration of synchronized constructor
public synchronized SynchronizedConstructorTest() {
System.out.println("Synchronized Constructor");
}
public static void main(String args[]) {
SynchronizedConstructorTest test = new SynchronizedConstructorTest();
}
}
https://www.tutorialspoint.com/can-a-constructor-be-synchronized-in-java