public class BooleanExpression2 {
public static void main(String[] args) {
int x=1;
/*
System.out.println(x>0);
System.out.println(x<0);
System.out.println(x!=0);
System.out.println(x>=0);
System.out.println(x!=1);
*/
//we make assigning value.
boolean expressionOne, expressionTwo, expressionThree;
expressionOne= x>0;
expressionTwo = x<0;
expressionThree = x!=0;
System.out.println(expressionOne);
System.out.println(expressionTwo);
System.out.println(expressionThree);
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter