skip to main content

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

Object Creation
The syntax of a standard Java object creation statement is:
The equivalent COBOL syntax is:
Where:
For example, the statement in Java:
BufferedReader bf = new BufferedReader(new InputStreamReader(uc.getInputStream()));
is translated to COBOL as:
CONFIGURATION SECTION.
   class jBufferedReader  as "java.io.BufferedReader".
WORKING-STORAGE SECTION.
77  bf   object reference jBufferedReader.
PROCEDURE DIVISION.
set bf to 
    jBufferedReader:>new(jInputStreamReader:>new(uc:>getInputStream())).

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