Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

Can we declare a class as static?

Category: Java

We can’t declare a top-level class as static however an inner class can be declared as static.
If inner class is declared as static, it’s called static nested class. Static nested class is same as any other top-level class and is nested for only packaging convenience.

Leave a Reply

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