Question: I know there are other questions about the general best practices while over riding hashCode and equals, but I have a very specific question. 

I have a class that has as an instance variable, an array of the same class. To be more explicit, here's the code:

```
Class Node{
    Node arr[] = new Node[5];
}

```

I need to overwrite hashCode for the class Node, and the array is an important, deciding factor in determining whether two Nodes are the same. How can I incorporate the array into the calculation of hashCode effectively?

--Edit--

I'm trying to check if the two nodes are the same, meaning that they have the same number of children, and that those children lead to the exact same states. Therefore, I'm effectively trying to compare the subtrees at the two node. I'm wondering if I can use hashing to do this equality check. 

I think I actually need to hash the entire subtree, but I'm not sure how I'd go about doing that given the recursive nature of my class definition.

Answer: 
Include http://download.oracle.com/javase/6/docs/api/java/util/Arrays.html#hashCode(java.lang.Object[]) as part of the hashCode() implementation.
You can use `Arrays.hashCode()` and `Arrays.equals()` methods.