Create a private inner class that implements a public interface. Write a method that returns a reference to an instance of the private inner class, upcast to the interface. Show that the inner class is completely hidden by trying to downcast to it.
I created the inner class that implements a public interface, but i just can't seem to understand the rest of it. In the method I'm writing, does he wants me to return the created object of the inner class, return the interface, or what?
And what he means by downcasting?
I think I have a problem with understanding what is the daily use of upcast and downcast, because I think I understood the meaning of it
(Correct me if I'm wrong - Upcasting is going to the base class and using it's methods and members, and downcasting is the exact opposite?)
Thanks a lot for all the help guys!
-= "A man can pretend to be serious, but cannot pretend to be witty" =-