Java for C/C++ Programmers

Building on the C/C++ foundation and leveraging the reader's experience.

Michael D. Reilly

September 30, 1996

3 Min Read
ITPro Today logo

New releases get two thumbs up

The hottest area in programming now is Webapplications, and since its release, Java has captured a lot of attention.Although many people think they can quickly throw together Java applications,they can't. Anyone who has thought about building Java applications knows thatJava is not a simple scripting language for creating quick Web applets. Rather,it's a powerful object-oriented programming language that resembles C++. Indeed,Java comes from C and C++. Programmers familiar with objects and C++ will have ahead start on understanding Java. Java for C/C++ Programmers builds onthat foundation and leverages the reader's experience.

The author, Michael C. Daconta, briefly introduces Java and its origins andpredicts that Java, with its robustness and portability, will overtake C andC++. He thinks Java will soon become the premiere language for standaloneapplications. Time will tell whether he's right. In the meantime, he's doing hisbest to make this prediction a reality.

Interestingly, Daconta is an accomplished C programmer who has publishedbooks on pointers and dynamic memory management--Java does away with bothfeatures. He says Java's benefits justify moving from C code and pointers, whichare useful in the right hands but problematic in a lot of code currently in use.

If you're not a C or C++ programmer, this book is not for you. If you areand you plan to learn Java, this book can be a good investment of your time.Daconta jumps right in with a Java program that prints "Hello World"and compares it to the same process in C. Expanding on this comparison, hedescribes Java's features and compares them to ANSI C and C++.

The author devotes a substantial section of the book to the Java classhierarchy, which in C terms, is the same as the standard library. Java has manyfeatures not in C or C++ because its developers took the parts they needed fromC and C++ and added features from other object-oriented languages, includingAda, Smalltalk, and Eiffel. Daconta discusses these features in detail, withlots of examples.

One of Java's advantages over other object-oriented programming languagesis its portability. The author explains the Abstract Window Toolkit, aplatform-independent interface that lets the programmer develop a GUI that willrun on any mainstream platform. Code examples illustrate the author's points.

Even if Daconta believes Java will become the universal programminglanguage, most people think of the Internet when they hear Java. The authordescribes Hot Java, applets, and JavaScript, and explains how to use them tobuild Web sites. He is careful to distinguish between Java, a programminglanguage, and JavaScript, a scripting tool. This distinction is worth makingbecause a lot of Internet surfers think Java is easy to use. Java for C/C++Programmers makes clear that to write applications with Java, you need aprogramming background and an understanding of C code and object-orientedprogramming. JavaScript is far less complex and has a shorter learning curvethan Java.

The floppy disk that ships with this book includes more than 100 Java andJavaScript source code examples from the book. The disk also contains Javaapplications, such as a Java database management system, and a multithreadedapplication that shows how Java can take advantage of multithreaded OSs.

This book will take programmers beyond just writing Java applets and willget them started on more complex applications. The writing style is no-nonsense,almost terse, because the author assumes his readers are looking for technicaldetail and not another treatise on writing Web pages. Even so, his enthusiasmand belief in both the power and the future of Java come through. As long asyou're comfortable with a book that contains many pages of code and you havesome experience with C and C++, I recommend this book.

Java for C/C++ Programmers

Author: Michael C. DacontaPublisher: John Wiley & Sons, New York, 1996ISBN 0-471-15324-9Price: $39.95, 443 pages

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like