We have looked at a lot of Java code in this chapter. We started by describing all the OOP features of the Java language, including defining classes, grouping classes in packages, and adding members to the classes by defining new methods and variables. We saw that the object-orientated features of Java did not end there, as abstract classes and interfaces offer a lot of possibilities to make well-structured code. We discussed the most important access modifiers and non-access modifiers, the process of upcasting and downcasting classes, and the POJO convention. We finished the chapter by looking at the various important features of the Java language, including its most important operators: if...else
conditions, for
loops, while
and do...while
loops. We also looked at arrays, collections, generics, and exceptions. We also tried out some of the more advanced features, such as multithreading and lambdas.
With all this knowledge, we are ready to do our first real project in Java. Let's...