[Solved] Applying static keyword to a class in java [duplicate]


Top-level classes cannot be static, because the static keyword represents a relation between a class/member/method and the enclosing class.

As the top-level classes don’t have an enclosing class, then the static keyword doesn’t makes sense in this case.

solved Applying static keyword to a class in java [duplicate]