LogiQuest
Back to Objects and Classes
7

What is the output of the following program?

class Main {
    static String f(int x) { return "int"; }
    static String f(long x) { return "long"; }
    static String f(Integer x) { return "Integer"; }
    public static void main(String[] args) { System.out.println(f(5)); }
}
Hard

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.