aspose file tools*
The moose likes Beginning Java and the fly likes cannot find symbol constructor Node(int,Node) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "cannot find symbol constructor Node(int,Node)" Watch "cannot find symbol constructor Node(int,Node)" New topic
Author

cannot find symbol constructor Node(int,Node)

davidson johnson
Greenhorn

Joined: Mar 07, 2009
Posts: 4
I'm trying to create a linked queue and wanted to test the insertion. But,on compililng, I'm getting this error:

cannot find symbol constructor Node(int,Node)

Here's my program:




And here's my node class:


Can anyone help me with this?
Gabor Kovacs
Greenhorn

Joined: Mar 07, 2009
Posts: 1


They aren't constructors. They are methods with a constructor name. Delete the "void" return type.

//sorry for my english
davidson johnson
Greenhorn

Joined: Mar 07, 2009
Posts: 4
It works. Thanks a lot man!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39395
    
  28
Welcome to JavaRanch, Gabor Kovacs

Thank you for pointing out that error; it is not a rare error to add a return type to what ought to be a constructor.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cannot find symbol constructor Node(int,Node)