QuesHub > 私人 > 部类 > 成员 > ASK DETAIL

Can we have a private class in Java?

Harper Collins | 2023-05-05 14:09:54 | page views:1064
I'll answer
Earn 20 gold coins for an accepted answer.20 Earn 20 gold coins for an accepted answer.
40more

Ethan Martinez

Works at the International Atomic Energy Agency, Lives in Vienna, Austria.
Inner Classes (Non-static Nested Classes) Inner classes are a security mechanism in Java. We know a class cannot be associated with the access modifier private, but if we have the class as a member of other class, then the inner class can be made private. And this is also used to access the private members of a class.
2023-05-06 14:09:54

Harper Adams

QuesHub.com delivers expert answers and knowledge to you.
Inner Classes (Non-static Nested Classes) Inner classes are a security mechanism in Java. We know a class cannot be associated with the access modifier private, but if we have the class as a member of other class, then the inner class can be made private. And this is also used to access the private members of a class.
ask:3,asku:1,askr:137,askz:21,askd:152,RedisW:0askR:3,askD:0 mz:hit,askU:0,askT:0askA:4