Java Programming Tutorial - 56 - Polymorphic Arguements

-1 vinit anchan · July 8, 2014
The topic is pretty confusing, but i understood whatever was explained in there, and as bucky said we can do the same way for polymorphic return types.. but i am unable to understand how to go about using a polymorphic return type.. 
So if anybody could help out with that part, with reference that same video. 
Thanks !

Post a Reply


Oldest  Newest  Rating
+5 Pere Garau Burguera · July 14, 2014
For example, you can have a method, like this:

public SuperClass method(...){
return new SubClass1();
return new SubClass2();


With SubClass 1 and 2 extending SuperClass. 

For example, Food would be the superclass and tuna and potpie the subclasses. 
0 vinit anchan · September 24, 2014
hey i figured it out eventually.. but thanks a lot for the reply ! appreciate it :)
  • 1

Java / Android Development


Very popular language used to create desktop applications, website applets, and Android apps.

Bucky Roberts Administrator