What does the code output

Report a typo

Here are four overloaded methods:

public static void method(short s) {  
    System.out.println("short");
}
    
public static void method(byte b) {  
    System.out.println("byte");
}
    
public static void method(int i) {  
    System.out.println("int");
}
    
public static void method(long l) {  
    System.out.println("long");
} 

Here is an invocation:

method(10);

What does the code output? Enter a string.

Enter a short text
___

Create a free account to access the full topic