@blonkm/

Abhisheksharm28

Java

https://repl.it/talk/ask/why-this-code-is-showing-errors-and-not-compiling-please-help/15215

fork
loading
Files
  • Main.java
  • Adder.java
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
class Main {
  public static void main(String [] args){
    Adder m = new Adder();
    int a = 23;
    int b = 34;
    int result = m.addThem(a,b); 
    double doubleresult = m.addThem(22.4,33.5);
    System.out.print("int a + b = " + result + "\n");
    System.out.print("double a + b = " + doubleresult + "\n");    
  }
}