Closed Icare67 closed 4 years ago
This code does not build:
class Globals { public static void foo() { System.out.println("no arguments"); } public static void foo(int len) { System.out.println("with arguments"); } } public class QuickStart { public static void test() { Globals.foo(); Globals.foo( 3); } public static void main(String[] args) { test(); } }
But if you rename Global to anything, it builds !!!
class Baz { public static void foo() { System.out.println("no arguments"); } public static void foo(int len) { System.out.println("with arguments"); } } public class QuickStart { public static void test() { Baz.foo(); Baz.foo( 3); } public static void main(String[] args) { test(); } }
This code does not build:
But if you rename Global to anything, it builds !!!