Solved

Which of the Following Method Declarations Would Be Appropriate for a Method

Question 94

Multiple Choice

Which of the following method declarations would be appropriate for a method that compares 2 numbers?
The method body is shown here:
{
Return num1 > num2;
}


A) public static void compare(int num1, int num2)
B) public static int compare(int num1, int num2)
C) public static boolean compare(int num1, int num2)
D) public static double compare(int num1, int num2)

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