void (Object object) { if (!(object instanceof String)) { return; } else if ((object instanceof Number)) { final String txt = (String) object; Number n = (Number) object; System.out.println(txt); System.out.println(n); } else { final String txt = (String) object; System.out.println(txt); } final String txt = (String) object; System.out.println(txt); }