What is a class keyword in Java?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Works at the United Nations High Commissioner for Refugees (UNHCR), Lives in Geneva, Switzerland.
The class keyword can also be used in the form Class.class to get a Class object without needing an instance of that class. For example, String.class can be used instead of doing new String().getClass(). ... Alternatively, the default keyword can also be used to declare default values in a Java annotation.
2023-05-14 14:10:04
评论(499)
Helpful(122)
Helpful
Helpful(2)

Amelia Cooper
QuesHub.com delivers expert answers and knowledge to you.
The class keyword can also be used in the form Class.class to get a Class object without needing an instance of that class. For example, String.class can be used instead of doing new String().getClass(). ... Alternatively, the default keyword can also be used to declare default values in a Java annotation.