How do you know if a class is inner class?

Now in order to check if the given class is a nested class, java. lang. Class#getEnclosingClass() method is used that returns a Class instance representing the immediately enclosing class of the object. If the class is a top-level class then the method will return null.

Sizin İçin Seçtik  Borsa hesabında bloke tutarı ne demek?

Leave a Reply

Your email address will not be published. Required fields are marked *

How do you know if a class is inner class?

Now in order to check if the given class is a nested class, java. lang. Class#getEnclosingClass() method is used that returns a Class instance representing the immediately enclosing class of the object. If the class is a top-level class then the method will return null.

Sizin İçin Seçtik  When would you use a static class?

Leave a Reply

Your email address will not be published. Required fields are marked *