[Solved] Is it possible to have a private class? [closed]


Since you start with Java – on the first degrees on your learning curve you will eventually not need any private classes. They make sense for inner classes (a class within a class) when this inner class is not usable/useful outside the parent class.

But for now: just keep in mind, that private is not forbidden in general for classes but don’t use this modifier.

Or – if you use eclipse/netbeans: just create a class, change the modifier from public to private and see what happens.

solved Is it possible to have a private class? [closed]