Difficulty: Easy
Time to solve: ~1 min
Video this is covered in: 1


public class Jtutorial1 {
    public static void main(String args[]){
        system.out.println("Hello World");
    }//end main
}//end class

Error Code: Exception in thread “main” java.lang.RuntimeException: Uncompilable source code – Erroneous sym type: system.out.println
at Jtutorial1.main(Jtutorial1.java:6)

Difficulty: Easy
Time to solve: <5 min
Video this is covered in: 2


import java.util.Scanner;
public class Jtutorial1 {
    public static void main(String args[]){
    Scanner input = new Scanner(System.in);
    
    double a=0, b=1, c=2, d=3;
    
    System.out.println("Enter a value for E: ");
    double e= input.nextDouble();
    
    System.out.println("Enter a value for F: ");
    double f;
    
    System.out.println(a+b+c+d+e+f);
    
    
    }//end main
}//end class

Input:
10000
5

Error information:Exception in thread “main” java.lang.RuntimeException: Uncompilable source code – variable f might not have been initialized
at Jtutorial1.main(Jtutorial1.java:14)

Difficulty: Easy
Time to solve: <5 min
Video this is covered in: 3


import java.util.Scanner;
public class Jtutorial1 {
    public static void main(String args[]){
    Scanner input = new Scanner(System.in);
    
    
    System.out.println("Enter your starting principle: ");
    double prin = input.nextDouble();
    
    System.out.println("Enter your yearly interest rate(10% = 10)");
    double inter = input.nextDouble();
    
    System.out.println("In 10 years you will have: " + ((prin*10*inter*10)));
    
    
    }//end main
}//end class

Input:
10000
5

Program Output:
Enter your starting principle:
Enter your yearly interest rate(10% = 10)
Error information:Program outputs incorrect value:In 10 years you will have: 5,000,000.0 (commas added for readability)

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)

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);
        
    System.out.println("How much does Employee 1 make? ");
    double emp1 = input.nextDouble();
    
    System.out.println("How much does Employee 2 make? ");
    double emp2 = input.nextDouble();
    
    System.out.println("How much does Employee 3 make? ");
    double emp3 = input.nextDouble();    
    
    if (emp1 > emp2){
    if (emp1 > emp3){
        System.out.println("Employee 1 makes more than the other 2 employees");
    }
    else{
        System.out.println("Employee 3 makes more than Employee 1.");
    }
    else{
        System.out.println("Employee 2 makes more than employee 1");
    }
    
    
    }//end main
}//end class

Input:
500
400
300

Program Output:
How much does Employee 1 make?
How much does Employee 2 make?
How much does Employee 3 make?
Employee 1 makes more than the other 2 employees
Error information:Exception in thread “main” java.lang.RuntimeException: Uncompilable source code – ‘else’ without ‘if’
at Jtutorial1.main(Jtutorial1.java:22)