• Post Reply Bookmark Topic Watch Topic
  • New Topic

cannot find symbol  RSS feed

 
Carolin Sha
Ranch Hand
Posts: 68
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Please see code below



I am getting this error any help would be appreciated.

error: cannot find symbol
graph G= new graph (edges);
^
symbol: class graph
location: class underground

error: cannot find symbol
graph G= new graph (edges);
^
symbol: class graph
location: class underground
 
Tony Docherty
Bartender
Posts: 3271
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is line 1 supposed to be a square bracket, I would have thought it should be a curly brace?
 
Carolin Sha
Ranch Hand
Posts: 68
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes it is a curley brace
 
Tony Docherty
Bartender
Posts: 3271
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The compiler is complaining it doesn't know what 'graph' is. Do you definitely have a class called 'graph' on the classpath?

BTW the Java naming convention is to start class names with an uppercase letter ie Graph.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!