I sometimes get a NullPointerException from the line below.
System.out.println("Date::"+ row != null ? row.getLegMaturityDate() : "null");
After adding brackets, this is normal.
System.out.println("Date::"+ (row != null ? row.getLegMaturityDate() : "null"));
Please clarify my behavior. Thanks in advance.
source share