In logical operator there are two operator
"&&" This is called as AND operator.
"||" This is called as OR operator.
"||" This is called as OR operator.
Example:-
public Class MyClass
{
public static void main(string[] arg)
{
int sub1=50;
int sub2=30;
if((sub1>=35)&&(sub2>=25))||((sub1<=60)&&(sub2<=40))
{
System.out.println(“The condition is true”);
}
else
{
System.out.println(“The condition is false”);
}
}
}
Here, perform a Logical operator.
0 Comments:
Post a Comment