Listing 1
/*
Numbers
An example for CoBOL or RPG programmers
*/
class Numbers {
public static void main(String args[ ]) {
int c; // a simple integer variable for holding a number
Integer b; // a complex data type, an Integer with associated code
b = new Integer(0);
// a complex data type needs initialization
c = b.parseInt(args[0]);
// using a subroutine (method) in the program
// "b" (an object) we translate a textual
// command-line argument into a numeric value
c = c + b.parseInt(args[1]);
// the same for the second parameter
System.out.println("The sum is " + c);
} // end of method
} // end of class