Chapter 2. Java and C: Key Differences

This chapter highlights the important differences between Java and C. We'll pay particular attention to familiar syntax and keywords that mean substantially different things in C—faux amis, as the French would say—and constructs that are foreign to Java. Where Objective-C adds to the C language in an unambiguous way, the similarities between Java and C can be a source of confusion. So the first step in your journey to Objective-C is to become comfortable with C.

Java and C++ are both C derivatives. Both created completely new, sophisticated, object-oriented languages while correcting some of the perceived inadequacies of C. Each imposes and enforces concepts such as constructors, method access, encapsulation, ...

Get Learn Objective-C for Java Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.