Professional Documents
Culture Documents
Practical No. 03
Practical No. 03
3
Program Code: To check multiple condition with if statement
class example {
int a = 10;
int b = 15;
if (a > 9)
}}}}
Exercise:
1.
class Nestedif{
}}}}
2.
class Ifstatement {
public static void main(String[] args) {
System.out.println("Number is positive");
}else
System.out.println("Number is negative");
}}
boolean a = true;
boolean b = false;
System.out.println("a || b = "+(a||b));
boolean a = true;
boolean b = false;
System.out.println("a || b = "+(a||b));