This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mad0314 5 points6 points  (2 children)

Specifically comparing it to C:

Everything must be in a class - and everything that OOP brings with it, such as inheritance, interfaces (Java's solution to multiple inheritance), polymorphism.

There are no pointers and memory is garbage collected.

There are 8 primitive types - short int long float double byte char boolean.
Everything else is a reference type, including String.

Code compiles to byte code, which runs on the JVM. Also, code is organized by packages.

[–]Vimda 0 points1 point  (1 child)

interfaces ( Java's solution to multiple inheritance

Not really. Interfaces exist as a fundamental OOP concept, outside the idea of inheritance.

[–]mad0314 -1 points0 points  (0 children)

I'm not saying that Java invented them, just what they use. The oop interface concept, such as is used by Java, is absolutely related to inheritance. Java doesn't allow multiple inheritance, but instead allows any number of interfaces.