•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 427,381 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,038 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 2819 | Replies: 1
![]() |
•
•
Join Date: Nov 2004
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
I am getting the following syntax messages:
illegal start of expression public void display_menu()
(with arrow pointing to the 'p')
and also
';' expected } (with arrow also pointing to the })
This is my code for the first error:
public class InsyStudent extends Student
{
public InsyStudent( String fName, String lName, String ssn )
{
int midTerm;
int finalExam;
int researchProject;
int presentationScore;
public void display_menu()
{
System.out.println( "1) INSY 3305\n2) INSY 3305\n3) INSY 4304");
System.out.println("4) INSY 4305\n5) INSY 4310\n6) INSY 4320\n" );
}
This is my code for the second error:
public String toString()
{
return String.format( "%s %s\t%s", super.toString(), selectCourse() );
}
}
What is the problem?
illegal start of expression public void display_menu()
(with arrow pointing to the 'p')
and also
';' expected } (with arrow also pointing to the })
This is my code for the first error:
public class InsyStudent extends Student
{
public InsyStudent( String fName, String lName, String ssn )
{
int midTerm;
int finalExam;
int researchProject;
int presentationScore;
public void display_menu()
{
System.out.println( "1) INSY 3305\n2) INSY 3305\n3) INSY 4304");
System.out.println("4) INSY 4305\n5) INSY 4310\n6) INSY 4320\n" );
}
This is my code for the second error:
public String toString()
{
return String.format( "%s %s\t%s", super.toString(), selectCourse() );
}
}
What is the problem?
![]() |
•
•
•
•
•
•
•
•
DaniWeb Java Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Error Message on Start-up... RUNDLL: Error loading C:\windows\system 32\bridge.dll (Viruses, Spyware and other Nasties)
- Weird error message and pc wont start at all (Troubleshooting Dead Machines)
- illegal start of expression (Java)
- start up error message (Windows NT / 2000 / XP / 2003)
- winsock.scr error message on every start up (Viruses, Spyware and other Nasties)
- winsock.scr error message on every start up (Windows NT / 2000 / XP / 2003)
- Error message on start up - bridge.dll file missing (Viruses, Spyware and other Nasties)
Other Threads in the Java Forum
- Previous Thread: what is the effect of using constructors in the program?
- Next Thread: problem in hotmail



Linear Mode