Can we create a private class in Java?

Jackson Hayes | 2023-05-05 14:09:55 | page views:1071
I'll answer
Earn 20 gold coins for an accepted answer.20 Earn 20 gold coins for an accepted answer.
40more

Scarlett Lee

Studied at the University of Oxford, Lives in Oxford, UK.
private classes are allowed but only as inner or nested classes.If you have a private inner or nested class, then access is restricted to the scope of that outer class. ... We can not declare outer class as private. More precisely we can not use private access specifier with outer class.
2023-05-13 14:09:55

Ethan Clark

QuesHub.com delivers expert answers and knowledge to you.
private classes are allowed but only as inner or nested classes.If you have a private inner or nested class, then access is restricted to the scope of that outer class. ... We can not declare outer class as private. More precisely we can not use private access specifier with outer class.
ask:3,asku:1,askr:137,askz:21,askd:152,RedisW:0askR:3,askD:0 mz:hit,askU:0,askT:0askA:4