Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
"X".equals(row1.name) ? 1 : 0
"X".equals(row1.name) ? 1 : 0
Hi,
looks like you're getting tripped up on a bit of subtle java syntax.
to get it to do what you want, you'll need to use the "<String>.equals()" String method instead of "==".
Java uses "==" to compare object references, not to check if the contents are the same.
give this a try in your tMap:
"X".equals(row1.name) ? 1 : 0