Java Syntax


This document is not a comprehensive list of Java or NetRexx operators. The Java books and online documents list all operators of which there are many, including many of the C/C++ operators. You can only learn them by actually using them, in my opinion. This page is to compare Java and NetRexx and warn you up front of some differences before they "gotcha".
The basic common operations:
  Add numeric variables. (see concatenation in table two)
  Subtract numeric variables
  Multiply numeric variables
  Divide numeric variables
  Compare numeric variables - op1 greater than  op2
  Compare numeric variables - op1 less than op2
  (double = sign) Compare for equal values for primitive vars or for the same object otherwise.

Some basic operations which differ in Java and NetRexx
function of operator
Concatenates two strings to form a new string
Gives remainder of op1 divided by op2
Compares op1 and op2 for inequality
Logical NOT
Logical OR
Compare numbers or padded strings (case insensitive) for equality

Note that NetRexx allows "fuzzy" logic comparisons as well as precise comparisons - for example, the strings "  FUZZY  " and "fuZZy       "  are equal when compared via the "=" operator in NetRexx.