Multiple choice technology programming languages

class Super { public static int main(int args[]) { System.out.println("Hi"); return 0; } public static void main(String[] args) { System.out.println("Hello"); int[] a={1,2,3,4}; int b=main(a); } } class main extends Super { public static void main(String[] args) { Super ob=new Super(); String[] b={"a","b","c","d"}; ob.main(b); System.out.println("Hi_Hello"); int[] a={1,2,3,4}; int c=main(a); } } what is the result?

  1. Compilation error.

  2. Runtime error.

  3. Hello Hi Hi_Hello Hi

  4. Hi_Hello

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The code has two overloaded main methods. When main(String[]) runs, it prints "Hello" then calls main(int[]) which prints "Hi" and returns. In the main class, ob.main(b) prints "Hello" then "Hi", then "Hi_Hello" prints, then main(a) prints "Hi" again. Total output: Hello Hi Hi_Hello Hi. Options A and B are wrong because the code compiles and runs without errors. Option D only captures part of the output.