Bad operand types for binary operator

java

Solution

In Java, you have to have boolean values on both sides of `||`. And, neither `one % 6` nor `one % 17` are boolean. However, `one % 6 != 0` and `one % 17 != 0` are.

Problem

I'm new to programming and I don't understand why `||` in the tenth line `while (one%6||one%17){` is considered bad operand types for binary operator. If someone could help me understand this, it would be greatly appreciated. ``` import java.util.Scanner; public class DivisibleBy6or17 { public static void main(String[] args){ Scanner in = new Scanner(System.in); System.out.print("Enter Value: "); int one = in.nextInt(); int sum=0; while (one%6||one%17){ System.out.print("Enter Value: "); sum=+1; } System.out.print("Numbers read: " + sum); } } ```

Original source