Skip to content

Instantly share code, notes, and snippets.

@isauravmanitripathi
Created April 7, 2019 23:49
Show Gist options
  • Save isauravmanitripathi/4d9d2c0c464ce49afab463ef038c275e to your computer and use it in GitHub Desktop.
Save isauravmanitripathi/4d9d2c0c464ce49afab463ef038c275e to your computer and use it in GitHub Desktop.
/**
* made by damnn
*/
public class demo {
public static void main(String [] args) {
boolean b;
b = false;
System.out.println("b is " + b);
b = true;
System.out.println("b is " + b);
// a boolean value can control the if statement
if(b) System.out.println("This is executed.");
b = false;
if(b) System.out.println("THis is not executed.");
// outcome of a relational operator is a boolean value
System.out.println("10 > 2-0 is" + (10 > 20));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment