Computer Science, asked by shinjan12, 1 month ago

Define a Class Program with the following specigications
a) int sum (int-a,int-b) returns the sum of the two numbers if (a) is greater than (b),otherwise returns the product of the numbers

Answers

Answered by priyamvadha12
1

The sum() method of Java Integer class numerically returns the sum of its arguments specified by a user. This method adds two integers together as per the + operator. It can be overloaded and accepts the arguments in int, double, float and long.

Similar questions