JAVA Chapter-4 (If,Else,)





     Short Notes- 

// ____________________CHAPTER - 4________________________________________
// 1. If - Else Statments
/*Scanner sc = new Scanner(System.in);
System.out.print("Entre your age = ");
int age = sc.nextInt();
int left =18-age;
if(age>=18){
System.out.println("Yes you can vote ");
}
else{
System.out.println(left+",Year more to go !");
}*/


// 2. Relational and Logical Operators -
//Logical Operators - They provide logic to java programs
/*
&& -- Logical AND (dono sach) Evalutes to true if all the statment are true evalute to false if both or
one of them is false
*/
/* System.out.println("For Logical AND");
boolean a = true;
boolean b = false;
if( a && b){
System.out.println("Y");
}
else{
System.out.println("N");
}*/
 NOTES DOWNLOAD --









0 Comments