Question: What is the error in the following program written in Java? public class Testing { public static void main ( String [ ] args )

What is the error in the following program written in Java?
public class Testing{
public static void main(String[] args){
int x =7;
double y =13.0;
System.out.println(x <4 && x >5);
System.out.println(13<= y <=16);
}
}
Cannot chain Boolean comparators together
Cannot compare double y to integer values 13 and 15
The value x cannot be less than 4 and greater than 5
Double y must be declared using 15.0f

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!