Sail E0 Webinar
Question
What is the output for the below code?
public class Test{
public static void printValue(int i, int j, int k){
System.out.println("int");
}
public static void printValue(byte...b){
System.out.println("long");
}
public static void main(String... args){
byte b = 9;
printValue(b,b,b);
}
}
Options:
A .  long
B .  int
C .  Compilation fails
D .  Compilation clean but throws RuntimeException
E .  None of these
Answer: Option B

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers