PS_Ch4_Q1
package com.company.Ch4_19_PracticeSet;
public class PS_Ch4_Q1 {
public static void main(String[] args) {
int a = 10;
//if (a=11)//Gives an error since = is an assignment operator it would not return ant boolean value
if (a == 11)// == is correct format for conditional statement
System.out.println("I am 11");
else
System.out.println("I am not 11");
}
}
Comments
Post a Comment