-
What is Whitespace?
-
Whitespace really has nothing to do with variables. We need
to define what it is so you can follow the next lesson on
declaring variables.
Whitespace is defined to be:
- a blank space (use the space bar to create this blank space)
- a newline (use the return key)
- a tab (use the tab key)
For the most part, Java treats all three as the same. They
may appear differently, but they are all considered whitespace.
-
Zero or More
-
When someone says they have "zero or more apples", what do they
mean? They mean they may have no apples, or one apple, or two
apples, or more.
We'll use the phrase "zero or more" often enough, so it's good
to know what it means.
-
One or More
-
When someone says they have "one or more apples", what do they
mean? They mean they may have one apple, or two apples, or more.
You're guaranteed that they have at least one apple.