using System; public class Test { public static void Main() { int a = 7; DoStuff(a); } static void DoStuff(object x) { Console.WriteLine("object"); } static void DoStuff(params int[] x) { Console.WriteLine("integer"); } }
In Java, this will output object:
public class Main { public static void main(String[] args) { int a = 7; DoStuff(a); } static void DoStuff(Object x) { System.out.println("object"); } static void DoStuff(int... x) { System.out.println("integer"); } }
No comments:
Post a Comment