52.0k views
1 vote
Write the definition of a method twice, which receives an integer parameter and returns an integer that is twice the value of the parameter .

User Kazoom
by
7.6k points

1 Answer

6 votes
public static int methodName(int a, int b){
a = a * 2;
b = b * 2;
}
int result = doubling(5, 10);
System.out.println(result);
//result would be 10, 20
User Lokanath Das
by
8.0k points

No related questions found