Current academic curricula for computer science programs across the US focus on traditional subjects and adhere to official guidelines for programming, theory, and project development. In many schools, this translates to a programming language approach that covers the fundamentals of computing and languages and tends to forget about the advancement of technologies in the real world. Therefore, as academics and practitioners, we are excited about this book’s perspective and the thorough treatment it provides for programming Java. It is a wonderful programming manual for Java that would be useful both to students exploring the Java programming language, as well as to developers in the field interested in reviewing necessary and advanced Java concepts.
It is important for the reader to realize that this is a “learn Java” book primarily for those interested in continuing to learn Android development afterward. As such, the book does not develop Android apps per se, but assures its reader that contained within are the necessary Java language concepts in order to do so. Perusing the table of contents, an advanced reader would be quite familiar with the chapter headings. Indeed, they follow what would be found in most Java language programming books, but cover more ground than many of their competitors. In addition, this treatment makes use of the latest Java 7 platform where we find classes such as TreeSet and NavigableSet in chapter 9 (and in other chapters as well).
The contents include an introductory chapter (including installation of software), and chapters on Java language fundamentals (assignment, casting, and bitwise operators), object-oriented technology (inheritance, polymorphism, and so on), advanced language constructs (assertions, generics, enumerated types, advanced math and string considerations, and threading), advanced application programming interfaces (APIs), input/output (I/O), databases, and Extensible Markup Language (XML). In addition, the book includes a potpourri of a few other chapters (on such topics as concurrency utilities, the collections framework, and networking).
A question that always arises in the mind of a programmer is why Java has gained prominence as a development language to the extent that it has. There are definitely pros and cons when discussing the Java language. The original stated reason for using Java is compile (write) once and run everywhere. The programmer could compile source code on a Linux, Mac, Windows, Solaris, or Android machine and execute the bytecode (compiled version) on any of the other machines. Java accomplishes this by providing the Java Virtual Machine (JVM) for each of these platforms; it is the JVM that interprets the universal bytecodes.
The perceived downfall of this approach is that the extra layer may slow things down. Java’s response to this is its high reliance on threading. The JVM threads everything that could possibly be threaded. If one has a multicore central processing unit (CPU), then the Java threads would be assigned to each individual core CPU, effectively behaving like a parallel machine. This speeds things up greatly. The development of Java has provided another significant advantage, which is the vast array of APIs that Java provides. This is what makes Java a suitable language for phone programming: most of the fundamental constructs are already provided to the programmer by Java.
This book is a refreshing review of Java concepts for those interested in advanced programming, such as for the Android platform. We encourage the authors to write a companion (sequel) text that concentrates on Android applications using the concepts learned from this text.