Hello so I am currently a beginner trying to learn Java and I keep getting this error and have no idea how to change it, this is what I get
Main.java:11: error: bad operand types for binary operator ‘<‘
System.out.println(“(2x + y/2 < z) is ” + 2 * x + y / 2 < z);
^
first type: String
second type: double
1 error
please help!!
public class Main
{ public static void main(String[] args) {
double x, y, z;
java.util.Scanner input = new java.util.Scanner(System.in);
x = input.nextDouble();
y = input.nextDouble();
z = input.nextDouble();
System.out.println("(x > y && y < z) is " + (x > y && y < z));
System.out.println("(x > y II y < z) is " + (x > y || y < z));
System.out.println("!(x >= y) is " + !(x >= y));
System.out.println("(2x + y/2 < z) is " + 2 * x + y / 2 < z);
input.close();
}
}