Constructor method in Java