4. Classes and Objects
In this chapter we discuss the fundamental concept of object oriented programming: classes and objects.
We have already seen the String class, and objects of the String class:
String s = "Hello, world!";We also call an object’s class the type of the object. In Java we can define our own classes, i.e. we can create our own types of objects.