In [1]:
public class Operacao {
public int soma(int n1, int n2) {
return n1 + n2;
}
}
Out[1]:
In [2]:
Operacao op = new Operacao();
System.out.println(op.soma(10, 15));
Out[2]:
In [ ]:
In [ ]:
Operacao op = new Operacao();
System.out.println(op.soma(10, "15"));
System.out.println(op.soma("10", 15));
System.out.println(op.soma("10", "15"));