Introduction to Software Development
GWU Computer Science
This guide contains basic examples that show the coding style that will be enforced in this class.
The comments above or after each line indicate the number of the style rule.
|-- indent Level 1 |-- indent Level 2 |-- indent Level 3
public class SimplePrint1 { // opening bracket 1 public static void main(String[] args) { // opening bracket 2 // statements are indented once System.out.println("Hello, World!"); System.out.println("How are you?"); } // closing bracket 2 } // closing bracket 1
|-- indent Level 1 |-- indent Level 2 |-- indent Level 3
public class SimplePrint2 { // opening bracket 1 public static void main(String[] args) { // opening bracket 2 // statements are indented once System.out.println("Hello, World!"); System.out.println("How are you?"); } // closing bracket 2 } // closing bracket 1