Dot Notation
The term
dot notation
refers to the syntax used to reference values and methods within an object or class.
For instance,
m.color = "yellow";
sets the object named
m
's instance variable called
color
to the string value
yellow
.
We've been using dot notation to call methods:
System.out.println("Hi");
This calls the println() method and is an example of
nesting
.
The
System
class is part of the
java.lang
package.
It has a class variable called
out
, which has a method named
println()
.