Don't do this: Share names
The following program is valid Java, even though the Runnable on line 1 is a completely different symbol than Runnable on line 3: public class Refrigerator implements Runnable { public void run() { new Runnable().freeze(); } public class Runnable { void freeze() { System.out.println("cold and refreshing"); } } public static void…