Every class object is created using the same new keyword, so it must have information about the class to which it must create an object. For this reason, the constructor name should be the same as the class name.
Read moreWhere is the class name in Java?
If you have a JavaSW object, you can obtain it’s class object by calling getClass() on the object . To determine a String representation of the name of the class, you can call getName() on the class.
Read more