Differences between Java and Cobol

Can anyone help compare and contrast Java and cobol in terms of technical differences as well as architectural design styles.

+5
source share
6 answers

Similarities

  • Cobol and Java were going to change the world and solve the programming problem.

  • None of them survived the initial hype.

  • Currently, there are very large, bloated Cobol and Java programs that are used by banks and are "obsolete" ... too large and critical for rewriting or discarding.

  • Cobol will introduce the idea of โ€‹โ€‹having long, readable names in its code. Java recommends long, readable names.

Differences

  • Cobol , , .

  • Java , , .

3 COBOL "-" , Java- / CamelCase.

+2

, , .

, :

  • , -.
  • ( , -)
  • !
+1

COBOL , -.

, , -, , pi , - , / COBOL ( , Cobol)

MOVE 3.14 INTO VARPI.
SUBTRACT ZERO FROM VARPI GIVING VARPIRESULT.
IF VARPIRESULT AND ZERO EQUALS VARPI THEN DISPLAY 'Ok'.

, COBOL 30...

, , , - . , , COBOL , - , , , , , COBOL .

Y2k (IBM MVS/360), 21- , , , , .. , ... , - - , .

, Java , Java (IBM MVS/360, 390, AS400)?

COBOL, " ", -, , , , ...

, , , -, Java, " " , .

, ( , , ) , , .. ( COBOL) Java, $$$ , , , (, ) .

, , , - :

COBOL:

  • -

,

Java:

  • -
  • Java -.

, ,

+1

:

  • , , .
  • - .
  • .
0

Cobol - , ( 90- , ).
Java - OO ( , OO Cobol ), Oh... .


: http://www.jsrsys.com/jsrsys/s8383sra.htm

! COBOL: COBOL Java: Java/OO ++: Java/OO Java, , OO (Object Orientation) " " , , , .

. , , , " " .

COBOL: / Java:

COBOL: PERFORM Java: ++: , FUNCTION / , . public/private , .

COBOL: , Java: ++: (. )

COBOL: , Java: ++: Java ( static, COBOL ( ). () ( JVM). . JsrSysout. COBOL SYSOUT. Java-, System.out.prinln(...). , , Java, SYSOUT , , DISPLAY UPON CONSOLE, . , , . Java, , ( /, JsrSysout) .

: ( ) . ? COBOL - -. COBOL - , . , - , .

Java . , ( ), . IbfExtract, . , Line Input Line Output. JsrLineIn JsrLineOut.

Java. , , . , . : .

COBOL: Java: . mymic ZZZ, ZZZ,... mask . JsrUtil. , - . padLeft, . padLeft . COBOL, , . Java . :

COBOL: Java: Java, IBM BigDecimal. Java . JVM. , , C ++. BigDecimal, .

COBOL: COPY INCLUDE Java: ++: ! COBOL, COPY INCLUDE, , . Java, B A, A B ! , Java-. //. IbfReport , . . IbfRP #### IbfReport , . IbfReport , () IbfRP #### .

COBOL: Java: try/throw/catch ++: (. )

COBOL: Java: ++: , , .

COBOL: Java: (, ).

COBOL: CLOSE Java:

COBOL: Java: ...

0

"Write Once, Run Anywhere". , Cobol .

Cobol - , Java - - . , Cobol OO , . Java, main().

. , , C ++.

The most significant difference is that Cobol supports its own fixed-point arithmetic. This is very important when working with finances. Most languages, including Java, only support this by adding to libraries, so they are several orders of magnitude slower when working with fixed-point data and prone to (potentially very expensive) errors in this library code.

0
source

All Articles