Question 2-4

Name two significant and distinct differences between the object-oriented features of Java and Smalltalk. Do not address other differences, like their radically different syntax.

Solution

  1. Everything's an object in Smalltalk, while Java has ``primitive types,'' which are not objects.

  2. Java provides data protection, while Smalltalk does not.

  3. Java is statically typed, and Smalltalk is dynamically typed. For Java, this means that the programmer must be more careful with defining types that are needed (as with the AccountListener interface, which was unnecessary in Smalltalk).

Back to Review for Quiz 2