Java Program Structure


Basic program design is simple: You define a class, define some variables, and define some procedures.
 
 

An example in Java

 public class Hello { 
static String s = "Hello";
        public static void main(String argv[]) { 

                System.out.println(s); } 

  }
 


 
An example in NetRexx

 class Hello

     s = "hello"

     method main(argv=string []) 

            System.out.println(s)
 


 

Note that variables or data items may be referred to as "properties" or "fields" of objects.
Likewise, methods may be referred to as functions, procedures, subroutines or "behaviors" of objects.
NetRexx will add an implied default "class" statement and a "main" procedure statement if omitted.