"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
//1.
SuperType sup = new SubType();
SubType sub = (SubType)sup;
//2.
SubType sub = (SubType) new SuperType();
Originally posted by Pawel Nowacki:
...am i right?
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Originally posted by Luca Fabbri:
In practical terms, what's the best way to deal with turning a sup into a sub? Do I have to clone sup into sub?
Arend van der Kolk wrote:Can someone explain one more time why the compiler only knows the types of the references? And why it does not know the runtime of the Object?
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |