0
What is the output of the given Java code?
public class Test { public static void main(String[] args) { method(null); } public static void method(Object o) { System.out.println("Object method"); } public static void method(String s) { System.out.println("String method"); } }
1 Réponse
+ 4
You can just run the code and see the output. It will be "String method".