GreenSalamanderCS's post

Key Differences between Java Syntax & C Syntax

Here are some of the key differences between the syntax in C versus the syntax in Java:

  1. Both C & Java use semicolons to end statements. However, Java also uses semicolons to indicate the end of declarations.
  2. C has a preprocessor to handle macros, whereas Java doesn't have a preprocessor.
  3. In the C programming language, you must declare all your variables at the beginning of the code block, whereas with Java, you can declare your variables anywhere within the block.
  4. The C programming language allows pointers, while Java does not.
  5. The syntax with C is simple, while the syntax with Java is complex.

More from GreenSalamanderCS