hey guys,
give me your advises (on the way to
scjp exam)
as you can see the code.
1. In case both the files are in the same package than there is no problem in inheritance unless the methods of Car class are private.
2. but when the classes are in the separated directories as below than i can only use two access specifiers for methods of class Car so that they get inherited in class test5, that two are, public and protected.
if i don't specify a access-level than it will be by default package, which means no matter inherited from where as long as its outside that package it cannot be accessed.
i used to mark those two methods(fast,slow) as package(i didn't specify the access specifiers) than i couldn't access them in test5.
i'm little bit confused, though i understand how it works, but i need some advises and recommendations from those who have experience in such tricky topics.
thanks guys,