Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

newb question

 
Julien Castelain
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok sorry (impatient newbie attitude)
 
Henry Wong
author
Marshal
Pie
Posts: 20992
76
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The String class does not have a chartAt() method. It does have a charAt() method though. Perhaps you misread it?

Henry
 
Julien Castelain
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes,
i saw that i made a typo...silly me
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic