Find what wrong with this code

Computer Science
Tutor: None Selected Time limit: 1 Day

// This application displays some math facts

public class DebugThree2

{

   public static void main(String args[])

   {

      int a = 2, b = 5, c = 10;

      add(a, b);

      add(b, c);

      subtract(c, a);            

   }

   public static void add()

   {

      System.out.println("The sum of " + a +

         and + b + is + a + b);

   }

   public void subtract()

   {

      System.out.println("The difference between " +

        a + and + b + is + a - b);

   }

}

Oct 5th, 2015

Thank you for the opportunity to help you with your question!

There shouldn't be main function in a class. 

Either rename the main function or remove the class in order to made the code work

Please let me know if you need any clarification. I'm always happy to answer your questions.
Oct 5th, 2015

Are you studying on the go? Check out our FREE app and post questions on the fly!
Download on the
App Store
...
Oct 5th, 2015
...
Oct 5th, 2015
Dec 7th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer