This is a debugging question - The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors,...


This is a debugging question -


The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly.


Code -



// This class determines the logarithm of a number

public class DebugTwelve1

{

  public static void main(String[] args) throws ArithmeticException

  {

     double num = -8.8, result.

     try

     {

        if(num <>

           throw(new ArithmeticException());

        result = Math.log(num);

        System.out.println("Result is " + result);

     }

     catch()

     {

        System.out.println("Can't take logarithm for value of zero or lower");

     }

  }

}



Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here