This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi! I'm new here, and this is my first post. I was hoping to get some help understanding the cannot find symbol error. I'm attempting to teach myself java using just my computer and a textbook called Head First Java that my school supplied to shut me up. If you could take a look at this code, copied from page 106, and tell me why I'm getting this error and what exactly it means so I can troubleshoot it in the future:
And here's the error that happens when I attempt to compile it
SimpleDotCom.java:8: error: cannot find symbol
int guess = Interger.parseInt(stringGuess);
symbol: variable Interger
location: class SimpleDotCom
(The carrot in the window is pointing to the I in Interger.parseInt)
Thanks In advance!
Welcome to the Ranch
I have added code tags to your post, which you should always use, and you can see how much better it looks
You should never use tabs for indenting. Always use spaces. If you get a decent text editor, you can set up options to do that automatically.
Joined: Oct 29, 2012
Thank you! What would constitute as a decent text editor? At the moment I'm using notepad, because that's all I actually have on my laptop. Also, should I use the code for whatever errors the compiler is giving me as well?
Personally I would say, yes, use the code tags for the error messages as well as the code. It formats it for you and makes it easier to read in my opinion. I don't know if the moderators of the forums would require it, but if they do I'm sure you can probably find a thread on posting rules somewhere.
Also I use notepad++ as a text editor. I don't know if it is what Campbell Ritchie means by saying "decent text editor", but it's what I use.
Joined: Oct 13, 2005
You have to beware of code tags for error messages; if the line is long, it creates left‑and‑right scroll bars, and the thread becomes very difficult to read.
Notepad is dreadful for programming; Notepad++ is excellent, however.
More comments here, here and here; those links say more or less the same thing. Remember to write backwards.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Hey can I have a little help understanding symbols?