What will be the output of the program? public class HorseTest { public static void main (String [] args) { class Horse { public String name; /* Line 7 / public Horse(String s) { name = s; } } / class Horse ends */
Object obj = new Horse("Zippo"); /* Line 13 / Horse h = (Horse) obj; / Line 14 / System.out.println(h.name); } } / class HorseTest ends */
Reveal answer
Fill a bubble to check yourself