Solved

What Is the Error in the Following Method Definition

Question 28

Multiple Choice

What is the error in the following method definition?
Public static void findMin(int x, int y)
{
Int min = 0;
If (x < y)
{
Min = x;
}
Else
{
Min = y;
}
}


A) The method returns the maximum instead of the minimum of the two arguments.
B) The method does not return a value.
C) The method returns 0 if the first and second arguments are equal.
D) The method does not specify a type for the second argument.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents