I have 3 questions and I would appreciate it if someone can explain it to me.
First of all,
Can an object belong to a class be assigned to a variable of a type that is a subclass without casting? If the answer is yes is casting required when assigning the object to a superclass? or did I just flipped them over?
Secondly, is it right that in an interface a method with a single parameter can accept as the argument value for that parameter objects from many different classes that are not related by inheritance? I will say yes to this question because the interface can be extended by different classes but I'm not sure if that's correct.
Finally, are methods inside a public class automatically defined public? or is it suppose to be defined as package?