Summary
We have at last written our first class. We have seen that we can implement a class in a Java file of the same name as the class. The class itself doesn't do anything until we instantiate an object/instance of the class. Once we have an instance of the class, we can use its variables and methods. As we proved in the Basic Classes app, each and every instance of a class has its own distinct variables. Just as when you buy a car made in a factory, you get your very own steering wheel, Sat Nav, and go-faster stripes.
All this information will raise more questions. OOP is like that. So, let's try and consolidate all of this class stuff by taking another look at variables and encapsulation, polymorphism, and inheritance in action in the next chapter. We can then go further with classes and explore topics such as static classes (like Log and Toast), as well as the more advanced concepts of abstract classes and interfaces.