The ultimate superclass, Part 1

1 2 3 Page 3
Page 3 of 3

The deepEquals() method compares its array arguments to see if they are deeply equal: each equivalent pair of array elements references objects whose contained primitive values and objects, the contained objects' contained objects, and so on are equal. (By the way, two null array references are considered to be deeply equal, which is why Arrays.deepEquals(null, null) returns true.)

What's next?

In Part 2, I explore the finalize() method and the topic of finalization. I also discuss the getClass() method and point out alternative ways to obtain a java.lang.Class object, and investigate hash codes and the hashCode() method.

Get the source code for this post's applications. Created by Jeff Friesen for JavaWorld

The following software was used to develop the post's code:

  • 64-bit JDK 7u6

The post's code was tested on the following platform(s):

  • JVM on 64-bit Windows 7 SP1
1 2 3 Page 3
Page 3 of 3