Java BugHunt #1: Output

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)

Java BugHunt #2

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... » read more

Java Bughunt #3-

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:... » read more

Java BugHunt #4: If

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:... » read more

Java BugHunt #5: If Statements

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... » read more