4 ms·
Not sure what your point about Java is since it doesn't seem to be either very evil or a very pure OO language.
by brl 18y ago
Not sure what your point about Java is since it doesn't seem to be either very evil or a very pure OO language.
- ramchip 18y agoEverything is in a class. Everything. Even poor little printf or the main function.
- weavejester 18y agoAlthough Java puts everything in an class, not everything in Java is an object. For instance, you can't write: Package p = java.lang; Class x = p.String; x y = "Hello"; Method z = y.substring; w = z(0, 5);
- mike_organon 18y agoThat's just the syntax failing to support such a nice way of accessing those objects. Packages, classes, and methods are objects. Of course, primitives are not objects, but autoboxing helps.
- weavejester 18y agoSure, they're represented as objects in the JVM, and you can access this via refection; but they're not treated as objects in Java's syntax. I'd argue that OOP is a property of a language's syntax, rather than how it is internally represented.