DEV Community

Discussion on: Why I love Java

Collapse
 
stealthmusic profile image
Jan Wedel

Fun fact: Java is not a pure object oriented language. int, float and other primitives are not objects. Moreover, objects actually should should not be able to mutate state of other objects directly (foo.bar = 3) but using messages (aka method calls).

In Python for example everything is an object. Numbers, strings, lists, functions, modules, code. Doing stuff like foo.bar = 3 actually calls a method in the background.