aspose file tools*
The moose likes Beginning Java and the fly likes newb question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "newb question" Watch "newb question" New topic
Author

newb question

Julien Castelain
Greenhorn

Joined: Sep 27, 2005
Posts: 28
hi all,

i just started learning with the "Head First Java 2nd edition
book : i'm at page 153 on the sink a dot com game"
here's what i get when i try to compile :


c:\data\java\simpledotcom2>javac DotComBust.java
.\GameHelper.java:69: cannot find symbol
symbol : method chartAt(int)
location: class java.lang.String
temp = String.valueOf(alphabet.chartAt(column));
^
1 error

alphabet is a String (i can post all the code if you want, but that class
is a "utility class" from the book)

i know this is a silly one but could you help me out ?

thanks a lot
Julien Castelain
Greenhorn

Joined: Sep 27, 2005
Posts: 28
ok sorry (impatient newbie attitude)
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 19070
    
  40

The String class does not have a chartAt() method. It does have a charAt() method though. Perhaps you misread it?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Julien Castelain
Greenhorn

Joined: Sep 27, 2005
Posts: 28
yes,
i saw that i made a typo...silly me
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: newb question