0
Can someone plz explain in what cases do we want to use inner classes?
2 odpowiedzi
+ 5
This example can help you understand the need of an Inner class.
Class Bank {
int name;
int unique_bank_id;
private Class AccountDetails {
int confidential_info;
int amount;
}
}
The class Bank has an inner class AccountDetails. The inner class can access all the members of its outer class but it cannot be accessed from any outside class.
+ 1
this inner class is very use full for making cms desktop apps