|
Do you need help with your Java programming?
Click here for instant help with your Java code. |
Compound Statements in Java
Compound statements consist of several statements grouped together. Statements are grouped together with curly braces that indicate that these statements belong to each other. For example: |
boolean exitProgram; //... if (exitProgram == true) { System.out.println("Exiting program..."); System.exit(0); } |
| Previous | Next | |
Tutorial Home | ||
| Do you know your Java? | |
| Take a Ten-Question-Java-Quiz! | |
Search for code examples on this site
