Checkpoint 8.3.1.
In
string x = thing.cube;
, what is the object and what is the instance variable we are reading the value of?
string
is a data type.x
is the local variable.- Consider the placement of
thing
– it is before the.
- Yes, we access the instance variable
cube
of the objectthing
using the dot operator. string
is a data type.