Single Choice Not Set

QWhat 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);
      }
}

ID: #2234 Overriding and Overloading in Java 1,141 views
Question Info
#2234Q ID
Not SetDifficulty
Overriding and Overloading in JavaTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A long
  • B int
  • C Compilation fails
  • D Compilation clean but throws RuntimeException
Correct Answer

Explanation

int

Share This Question

Challenge a friend or share with your study group.

Related MCQ Questions