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 ...
Get Technical Java™: Developing Scientific and Engineering Applications 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.