Tree parent and child nodes I have this method that returns true if attribute is already used and false otherwise:

public boolean alreadyUsed(Node node, int attribute) 
{
    if (node.parent == null) 
    {
        return false;
    }

    if (node.children != null) 
    {
        if (node.splitAttribute == attribute )
        {
            return true;
        }
    }
    return alreadyUsed(node.parent, attribute);
}


Can this be written in a more understandable way?
Well, following conventions helps making your code more understandable. One convention is, for methods that return a boolean, using a predicate as a name, or as said in this answer, using a question. 

So to begin with, I'd name the method isAlreadyUsed.

A second improvement by following conventions would be using accessor methods:

node.getParent() instead of node.parent. But that depends on the scope of Node.

Item 14 in Joshua Bloch's Effective Java:


  In public classes, use accessor methods, not public fields