In Java and other object-oriented languages, an object is a collection of data that provides a set of methods. For example,
Scanner, which we saw in Section 3.2, is an object that provides methods for parsing input.
System.in are also objects.
Strings are objects, too. They contain characters and provide methods for manipulating character data. We explore some of those methods in this chapter.
Not everything in Java is an object:
boolean are so-called primitive types. We will explain some of the differences between object types and primitive types as we go along.