I am getting NullPointerException from the below line sometimes.
NullPointerException
System.out.println(\"Date::\"+ row != null ? row.getLegMaturityDate() : \"null
It's a matter of operator precedence. Christoffer Hammarström has the executive summary. See this page http://bmanolov.free.fr/javaoperators.php for more detail.