Skip to main content
Engineering LibreTexts

17: Strings and Things

  • Page ID
    15269
  • 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.out and 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: int, double, and boolean are so-called primitive types. We will explain some of the differences between object types and primitive types as we go along.

    • Was this article helpful?