Analyze the following code:

public class Test {
public static void main(String[] args) {
System.out.println(xMethod(5, 500L));
}

public static int xMethod(int n, long l) {
System.out.println("int, long");
return n;
}

public static long xMethod(long n, long l) {
System.out.println("long, long");
return n;
}
}
a. The program displays int, long followed by 5.
b. The program displays long, long followed by 5.
c. The program runs fine but displays things other than 5.
d. The program does not compile because the compiler cannot distinguish which xmethod to invoke.

a

Computer Science & Information Technology

You might also like to view...

The ________ controls when the CPU moves to the next processing stage

Fill in the blank(s) with correct word

Computer Science & Information Technology

The default value for Split Form Datasheet property is Allow Edits

Indicate whether the statement is true or false

Computer Science & Information Technology