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:
- Both C & Java use semicolons to end statements. However, Java also uses semicolons to indicate the end of declarations.
- C has a preprocessor to handle macros, whereas Java doesn't have a preprocessor.
- 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.
- The C programming language allows pointers, while Java does not.
- The syntax with C is simple, while the syntax with Java is complex.