From: Navindra Umanee Date: 2005-01-30T08:07:49+09:00 Subject: Re: Ten Things Every Java Programmer Should Know About Ruby Florian Frank wrote: > > Hmm... not sure if I understand that last part... but one thing is > > very clear though... in Javaland, you simply cannot make pigs fly. > > In (non-evil) Ruby it's not possible either, to transform pigs into birds. > > > In other words, aFlyingPig = (Bird) aPig will not fly. The compiler > > will just segfault laughing while cursing profanities at you. > > To have some fun at run-time try this: > > Bird flyingPig = (Bird) (Object) pig; Exactly, Java is strongly typed, it tries to catch as many violations as it can at static time but catches them all at runtime. Cheers, Navin.