Object test; test = Start.run(str3); System.out.println(test.getClass().getName()); Typo k = null; k = (Typo) test; k.run(str3);