A Runtime class in Java is used to interact with the Java runtime environment. Java Runtime class provides methods to execute a process, invoke GC, get total and free memory, etc.
getClass() method returns the runtime class of an object. That class object is locked by static synchronized methods of the represented class.
Want to learn Java? Check out the Java certification from Intellipaat.