Implementing method overloading for addition operation

Report a typo

In a Java program, there are two methods with the same name 'add', but with different parameter types. These methods perform addition operation and return the result. One method adds two integers, while the other one adds two double values. You need to fill the blanks in the code that makes these two methods work properly so that the program can successfully add two integers as well as two double numbers.

Fill in the gaps with the relevant elements
public class Main {
      add(int a, int b) {
         a + b;
    }
    static  add(double a, double b) {
        return a + b;
    }
    public static void main(String[] args) {
        System.out.println(String.valueOf(add(2, 3)))
        System.out.println(String.valueOf(add(2.0, 3.0)));
    }
}
staticreturnintdouble
___

Create a free account to access the full topic