| Author |
collection class polymorphism
|
siddharth das
Ranch Hand
Joined: Aug 17, 2007
Posts: 124
|
|
hi all, i have a doubt. why gives compilation error.Animal is a user defined class. and gives comilation error? please suggest me.Thank You.
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8147
|
|
|
Moving to JiG(B).
|
[My Blog] [JavaRanch Journal]
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12929
|
|
It should not give a compilation error, unless for example class Animal can't be found. If that's the case, then make sure it is on the classpath. What exactly is the compilation error you get?
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
camilo lopes
Ranch Hand
Joined: Aug 08, 2007
Posts: 202
|
|
none of them compels with error, however the code below compels with error sees: the polimorfismo does not function with generics types as it functions with arrays.
|
Brazil - Sun Certified Java Programmer - SCJP 5
http://www.camilolopes.com/ About Java - Update every Week.
Guide SCJP - tips that you need know http://blog.camilolopes.com.br/livrosrevistaspalestras/
|
 |
Red Smith
Ranch Hand
Joined: Aug 05, 2007
Posts: 105
|
|
|
Make sure you are using the Java 5 or Java 6.
|
 |
 |
|
|
subject: collection class polymorphism
|
|
|