You can use an object field in the following situations:
If you want to test for equality of the value of two objects, use the Java™ 'equals' method as follows:
D objectEquals PR N EXTPROC(*JAVA D : 'java.lang.Object' D : 'equals') C IF objectEquals (obj1 : obj2) C ... C ENDIF
D Obj S O CLASS(*JAVA D :'java.lang.Object') D Str S O CLASS(*JAVA D :'java.lang.String') D Num S O CLASS(*JAVA D :'java.math.BigDecimal') * Since all Java classes are subclasses of class 'java.lang.Object', * any object can be assigned to a variable of this class. * The following two assignments are valid. C EVAL Obj = Str C EVAL Obj = Num * However, it would probably not be valid to assign Str to Num.