Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
0
Perhaps it would be good to review the tutorial? public exposes something to everything - protected methods can be accessed from classes in the same package as well as any class that extends the class it's declared in. It's really useful for methods you don't want to expose publicly but may need to be implemented/overridden for different functionality
22nd Jun 2018, 7:20 PM
Dan Walker
Dan Walker - avatar