Chapter 3. Moving from C to Java
If you are a C programmer moving to Java, there is good news. Java is a C-based language, so much of the basic syntax is the same—you still put semicolons at the end of statements, array indices still start at 0, and so on. Every Java program will have a main() method that serves as the starting point of the program just as in C. Some of the built-in library functions share the same names in Java and C.
While Java and C share a number of similarities, there are new concepts to learn when moving to Java. The primary shift from C to Java is that you will have to learn how to think in an object-oriented sense. A C program is a collection of functions. A Java program is a collection of classes. A class is a block of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access