skip to main content

Converting Java Source Code to Object-oriented COBOL : Java OOP statements : Method Invocation

Method Invocation
The syntax of a standard Java object method invocation is:
The equivalent COBOL syntax is:
Where:
a.
b.
NOTE: While ObjectName is not case sensitive because it is COBOL data-item, the name of the method is case sensitive because Java language is case sensitive.
The following Java syntax:
is translated to COBOL as:
Note: isCOBOL doesn’t support autoboxing, you can’t pass native data types where Object are required. For example, consider the following constructor:
With Java (starting from version 1.5) you’re allowed to call the method in this way:
int i = 0;
long l = 2;
With isCOBOL you need to use java.lang objects instead:
configuration section.
 class JInt as "java.lang.Integer"
 class JLong as "java.lang.Long"
procedure division
myMethod (JInt:>new(0), JLong:>new(2));;

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left