Re: Error help?
- From: "Tukewl4u" <TuKool4u@xxxxxxxxxxx>
- Date: Sun, 24 Sep 2006 19:28:41 -0500
Ok, I'm a little confused. I've thought that, but what does 'cannot find
symbol' mean? Does something need to be specified in the object? I'm trying
to modify Small Java Fig. 3.7-3.8
http://www.cs.unt.edu/~irby/Courses/1030/programs/SJch3.html to a class
project and don't see the difference. To me...it should work. Now I get:
Executing: C:\Program Files\ConTEXT\ConExec.exe "C:\Program
Files\Java\jdk1.5.0_07\bin\javac.exe" "GradeBookTest.java"
GradeBookTest.java:29: cannot find symbol
symbol : variable input
location: class GradeBookTest
String name = input.nextLine(); // read a line of text
^
GradeBookTest.java:34: non-static method displayMessage() cannot be
referenced from a static context
GradeBook.displayMessage();
^
2 errors
Execution finished.
"Eric Sosman" <esosman@xxxxxxxxxxxxxxxxxxx> wrote in message
news:sJKdnX3eYo5ZaovYnZ2dnUVZ_qCdnZ2d@xxxxxxxxxxxxxx
Tukewl4u wrote:
Hello all
Can some one tell me why I'm getting this error? I really don't
understand
why it shouldn't work.
GradeBookTest.java:30: ')' expected
gradebook2.setCourseName ( String Name ); // set the course name
^
[...]
String Name = input.nextLine(); // read a line of text
gradebook2.setCourseName ( String Name ); // set the course name
Should be
gradebook2.setCourseName(Name); // set the course name
--
Eric Sosman
esosman@xxxxxxxxxxxxxxxxxxx
.
- Follow-Ups:
- Re: Error help?
- From: IchBin
- Re: Error help?
- References:
- Error help?
- From: Tukewl4u
- Re: Error help?
- From: Eric Sosman
- Error help?
- Prev by Date: Re: Error help?
- Next by Date: Re: typesafe java.util.Map construction and initialization
- Previous by thread: Re: Error help?
- Next by thread: Re: Error help?
- Index(es):