// This application displays some math facts public class DebugThree2 {    public static void main(String args[])    {       int a = 2;       int b = 5;       int c = 10;       add(a, b);       add(b, c);       subtract(c, a);                }    public static void add(int

icon
Related questions
Question
Find and fix any logic and syntax errors.
 
// This application displays some math facts
public class DebugThree2
{
   public static void main(String args[])
   {
      int a = 2;
      int b = 5;
      int c = 10;
      add(a, b);
      add(b, c);
      subtract(c, a);            
   }
   public static void add(int a,  b)
   {
      System.out.println("The sum of " + a +
         " and " + a + " is " + (a + b));
   }
   public static void subtract(int a, b)
   {
      System.out.println("The difference between  +
        a + " and " + b + " is " +  (a * b));
   }
}
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, data-structures-and-algorithms and related others by exploring similar questions and additional content below.