Created
April 7, 2019 23:49
-
-
Save isauravmanitripathi/4d9d2c0c464ce49afab463ef038c275e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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