interface STD{
public Name getName();
}
class Student implements STD{
Name getName(){ }
private class Name{
}
}
In the code above the interface can't see the private class Name, is there a way to make it see it while it's a private inner class to define a data type from it?
protected class Name
Use a protected variable so the interface can see it, but not any other class that isn't directly related
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With