Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

StringInfo

 
Michael Roslansky
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to compile this block of code, but I keep recieving the error message "cannot find symbol - class StringInfo". Help would be appreciated.
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you defined StringInfo?

return new StringInfo (s).parseDouble (-1);
 
Campbell Ritchie
Sheriff
Pie
Posts: 49776
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that illegible block of unformatted code has that text in, but what the question really means is, “Where is the StringInfo.java file?”
 
Lalit Mehra
Ranch Hand
Posts: 384
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure you are compiling from the right directory ???

If you are compiling from the command prompt make sure to include the StringInfo class location in the javac command

cheers :-)
 
Michael Roslansky
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Sorry about not formatting it. I thought that StringInfo was a default class of Java or something. I ended up finding the StringInfo class.


My problem now is that I'm trying to run the IO class, but everytime I try to enter a string parameter I get the "Error: cannot find symbol- variable "xxx"". I realize I need to define the parameters, but I have no idea how to go about that. This is suppose to be a complete program, so I'm pretty sure I'm doing something wrong if I can't run it. Sorry for the basic question.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic