Declaring a tree in Java

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

  1. DesertFox macrumors member

    Joined:
    Nov 25, 2004
    #1
    Hello,

    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

    Catfish_Man

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

Share This Page