Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can someone please debug this for me? Java code to copy below public class Throw

ID: 3853273 • Letter: C

Question

Can someone please debug this for me?

Java

code to copy below

public class ThrowEagleExceptionTest {
public static void main(String[] args)
{
try {
EagleLanding();
}
catch(EagleLandingException badEagle)
{
System.out.printf("%s ", badEagle.getMessage());
System.exit(9999);
}
}

private static void EagleLanding()
{
EagleLandingException("There is a problem with the Eagle!");
}
}

ITCS-2590 Debugging Execse Chapter 11 - NetBeans IDE 8.2 File Edit View Navigate Source Refactor Run Debug Profile Teem Tools Window Help Search (Ct1+) ReadTextFile-javaThrowEagleExceptonTest.java x Source History ReadTextFile.javaThrowEadleExceptionTest.java x Projects X 1013 93b 98 You ill need to debug this rile TCS-2990 Debugging Exercise Source Packages The ourput should be: run ReadTextle java There is a problem with the Eagle! Java Result: 9999 .. ReadTextFileTest.java BUILD SUCCESSFUL (total time: 0 seconds) EaglelandingExepbon.jave0BUILD 12 public class ThrowEaglcExceptionTest ( Test Packages Lbraries Test Libraries 13 14 15 16 17 public static void main (String arga) try ITCS-2590 Debugging Exerase EagicLanding) catch (EagleLandingExc tion badEagle 19 20 21 System.out.printf("63 ", System.exit (9999) badEagle.getHe53age()); 24 private static void Eagletanding0 26 EagietandingException("There is a problem with the Eagle!") 28 29 Test Results X Output INS @ ^ dq) 4 4.50 PM 6/30/20172 Type here to search

Explanation / Answer

Hi i make small change to your program

now it can compile and run also:

class ThrowEagleExceptionTest {
public static void main(String[] args)
{
try {
EagleLanding();
}
catch(Exception badEagle)
{
System.out.printf("%s ", badEagle.getMessage());
System.exit(9999);
}
}
private static void EagleLanding()
{
System.out.println("There is a problem with the Eagle!");
}
}