Log in Help
Print
Homegatewikicowtestunitgateyamresources 〉 yam-code.html
 

Testing code listings

Contents

1. Some Java code

This is an example of some Java code

public class Example {
  public static void printHello() {
    System.out.println("hello");
  }

  public static void main(String[] argv) throws Exception {
    printHello();
  }
}
Note in particular the main method:
  public static void main(String[] argv) throws Exception {
    printHello();
  }

2. Some XML

This is an XML file

<root>
  <child />
  <child name="second" />
</root>