Java – what is Class means a class name
•
Java
. What does class mean, for example, MyClass class? I understand that when you place the name of a class and the point it uses to access its static fields or methods, but this does not involve ' class’
Solution
SomeClass. Class get class < someclass > types that can be programmed using the reflection API
If you have an instance of a class, use instance GetClass (), you can get the same type
You can view the document here For example, you can:
>Get the names of fields and methods, comments, etc. > Call the method and get the constructor to create a new instance of the class > get the name of the class, superclass, package, etc
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码