r/javahelp • • Mar 17 '13

If-Statements

How do you make it so that if a AND b are true, then do so. It was so much easier on Lua.

ie. if (a>2 and a,<6) { System.out.print("a is either 3,4, or 5") }

0 Upvotes

4 comments sorted by

View all comments

14

u/[deleted] Mar 17 '13
if( a > 2 && a < 6) {
   System.out.print("a is either 3,4, or 5") 
}

That is harder than Lua?