Java Reference
In-Depth Information
EXIT-PROGRAM.
EXIT PROGRAM.
STOP RUN.
You may have noticed that you separate MYSUB's parameters into two types:
items in the CONTROL-AREA and other parameter items. This is done by design
in order to distinguish parameters in the CONTROL-AREA (these are analogous
to class data members) and other parameters (analogous to parameters passed to
a class's methods, or functions). You will expand on this convention as you go.
M ESSAGES IN J AVA
Once again, let's compare what you've done in COBOL to the way you would do it
in Java.
E RROR M SG C LASS
Let's define a method in the ErrorMsg class.
public class ErrorMsg {
public String msgText;
public int msgSize;
public void setErrorMsg (String inputMsg) {
...
// Some logic
...
;
}
}
The statement that contains setErrorMsg describes a public entry point (i.e., a
method ) to the class ErrorMsg . These methods can be called by other classes to per-
form some function in this class.
Search WWH ::




Custom Search