If without else ternary operator

No, you cannot do that.
Instead try this:

if(bool1 && bool2) voidFunc1();

Leave a Comment