Quick Question

Can you assign an object of a superclass to a subclass reference?

[72 byte] By [Storm9a] at [2007-11-27 11:09:01]
# 1

Quick answer: try it!

floundera at 2007-7-29 13:32:46 > top of Java-index,Java Essentials,New To Java...
# 2

Man, a bad day for you, Storm9. You can't get ANYONE to do your homework. Bummer!

petes1234a at 2007-7-29 13:32:46 > top of Java-index,Java Essentials,New To Java...
# 3

No. you will get classcast exception if you cast it.

AnanSmritia at 2007-7-29 13:32:46 > top of Java-index,Java Essentials,New To Java...