0

Pass two int as a parameter. And return the sum of numbers

how to pass and return #java

4th May 2017, 5:22 AM
Mohan
Mohan - avatar
1 Answer
+ 10
// method definition public int sum(int i, int j) { return i+j; } // call the method and store the return value int k=sum(1,2);
4th May 2017, 5:25 AM
Tashi N
Tashi N - avatar