Asked by Janysh Kudaibergenov on Jul 13, 2024

verifed

Verified

public static double secret(int first, double second)
{
Double temp; if (second > first)
Temp = first * second;
Else
Temp = first - second; return temp;
}What is the return type of the method in the accompanying figure?

A) public
B) int
C) void
D) double

Return Type

The type of data that a method sends back to the entity that called it.

  • Acquire understanding of method return types and the application of the return statement within methods.
verifed

Verified Answer

AM
Ardra MeletathJul 16, 2024
Final Answer :
D
Explanation :
The method returns a variable of type double, so the return type of the method should be double.