Difficulty: Easy
Time to solve: <5 min
Video this is covered in: 6
import java.util.Scanner;
public class Jtutorial1 {
public static void main(String args[]){
Scanner input = new Scanner(System.in);
int x=5;
if (x = 10){
System.out.println("I love you heaps!");
}
else{
System.out.println("I love waffles");
}
}//end main
}//end class
Error information:Exception in thread “main” java.lang.RuntimeException: Uncompilable source code – incompatible types
required: boolean
found: int
at Jtutorial1.main(Jtutorial1.java:8)