From: Devin Mullins Date: 2005-07-20T08:30:17+09:00 Subject: Re: Ruby/Rails as a starter language? Daniel Amelang wrote: >>In Java, classes aren't objects. >> >> >Sorry Hal: > >http://java.sun.com/docs/books/tutorial/reflect/class/index.html > > Close, but no cigar. Classes aren't objects. *Sure* there is this magical Class object which you can use to get access to magical Field objects and Method objects, but that means that java.lang.String.class is an object, not java.lang.String. Which means, in the most practical sense, that Daniel Brockman's little polymorph example isn't possible, as written. (Yeah, you could pull it off if you require the client to pass in a String of the qualified name, or the corresponding Class object, and if you make extensive use of the Reflection API, but that just proves that classes aren't objects.) Am I being pedantic? Maybe. But it's certainly enough of a difference for me to notice, and like Ruby for it. Devin I wasn't mocking Java for having magical Method objects, btw. :)