Introduction Flashcards

1
Q

Give all the ways a java object may be accessed !

A

a java object can be accessed using a reference variable of its
own class, of its super class, of an abstract super class or
of an interface that the class the object belongs to implements
either directly or through a superclass

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Give a characteristic of assigning an object to a super type !

A

when assigning an object to refernce variable of the same
type as the super class of the class that object belongs to,
an explicit cast is not required

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Give a characteristic related to reference types that point to the same object in the context of polymorphism !

A

When an instance of an object is assigned to a reference type, only methods and variables available to that reference type can be called using that reference type even though the object may contain other members in memory that are not accessible to that reference type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly