Declaring a tree in Java

Discussion in 'Mac Programming' started by DesertFox, May 25, 2007.

  1. DesertFox macrumors member

    Nov 25, 2004

    Im trying to declare a tree in java, but it keeps giving me an error when I try to delcare it. Is my syntax for declaring the tree correct?

    The error occurs on line 6 (Tree theTree = new Tree) and the error message is:
    Error: '(' or '[' expected

    Thanks in advance!
  2. Catfish_Man macrumors 68030


    Sep 13, 2001
    Portland, OR
    Constructors in Java require an argument list, even if it's an empty one. new Tree()

Share This Page