Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (7k points)

Can someone tell me a simple description of what a “runtime class” is and what getClass() does?

1 Answer

0 votes
by (13.1k points)

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.

Related questions

0 votes
1 answer
asked Jul 17, 2019 in Java by Anvi (10.2k points)
0 votes
1 answer
asked Mar 21, 2021 in Java by Jake (7k points)
0 votes
1 answer
asked Mar 10, 2020 in Java by Sudhir_1997 (55.6k points)
0 votes
1 answer

Browse Categories

...