SCJP6 96% | SCWCD5 81% | SCDJWS5 79%
Minhaj kaimkhani wrote:I mean a class it self cannot declare as static but you can have a static inner class object in a class.
Minhaj kaimkhani wrote:yes true, the most outer class.
Minhaj kaimkhani wrote:well as i said before a class can have another class(i.e. Inner class) that can be declared as static; example: class Clazz{ static class subClazz{ //its a static inner class. static class subSubClazz{ //its another static inner class. } } } in the above case Clazz is the most outer class.
Swagato Bhatta wrote: Minhaj kaimkhani wrote:well as i said before a class can have another class(i.e. Inner class) that can be declared as static; example: class Clazz{ static class subClazz{ //its a static inner class. static class subSubClazz{ //its another static inner class. } } } in the above case Clazz is the most outer class. Thank you
Swagato Bhatta wrote:
Abhishek Bose wrote: Swagato Bhatta wrote: Minhaj kaimkhani wrote:well as i said before a class can have another class(i.e. Inner class) that can be declared as static; example: class Clazz{ static class subClazz{ //its a static inner class. static class subSubClazz{ //its another static inner class. } } } in the above case Clazz is the most outer class. Thank you What if we declare a static class implementing a comparator<>?
Abhishek Bose wrote:
OJAJP 8 FAQ Free Java 8 Mock Exams Java 8 Certification Guide OCAJP Books OCAPJP and OCPJP guide