|
Language semantics is the problem here. I don't know where/how you are learning java.
If I answered these from my (limited) point of view/language I would say:
1. All user-defined interfaces are subtypes of the type Interface.
Awkward way of asking. Probably, yes.
2. A method call is sent to an object and the method of the actual type is executed.
Strictly speaking, no. But probably yes. The jvm selects the method according to its name, return type and the number and type of arguments.
3. A data model specifies the user interface.
Agreed: false.
4. If classes B and C are subclasses of A, then any state variable of A is also a state variable of B and C.
A "state" variable is generally considered a member or instance variable in class scope. Subclasses can access public, protected and package-private (from within the package) variables of a superclass but not private variables. I tried to show this in the test app.
So, generally speaking, yes, except for private variables. Access of *any* variable in the superclass, no.
|