So far from I have been searching through the net, the statement always have if and else condition such as a ? b : c. I would like to know whether the if<
pstmt != null && pstmt.close;
The line of code above translates to When the left side of the expression "translates" to true -> execute the right side.
Just write it out?
if(pstmt != null) pstmt.close();
It's the exact same length.
Why using ternary operator when you have only one choice?
if (pstmt != null) pstmt.close();
is enough!
No, you cannot do that. Instead try this:
if(bool1 && bool2) voidFunc1();