If class B
extends class A
: what is the output of the following code?
package com.swquiz.overloading;
public class TitBitOverloading7 {
public static void main(String[] args) {
overload((A)null);
overload((B)null);
}
public static void overload(A a) {
System.out.println("A");
}
public static void overload(B b) {
System.out.println("B");
}
}
Ans - A B I don't know how? Can you explain how null is processed.