Hello I am down to 1 error can anyone please assist;

java:41: not a statement
+ "P or p (premium): ";


It is part of this section;

System.out.print ("Enter the service type:")
+ "R or r (regular), "
+ "P or p (premium): ";
serviceType = console.next ().charAt (0);
System.out.println();

Recommended Answers

you shld av written the whole code, so a helper wld know wat to do.... write the full code then you'll get help

Jump to Post

All 2 Replies

you shld av written the whole code, so a helper wld know wat to do.... write the full code then you'll get help

System.out.print ("Enter the service type:")
+ "R or r (regular), "
+ "P or p (premium): ";

You have your brackets all naffed up. The ) on the first line matches the ( before it and ends that expression, so the compiler is baffled when the next thing it sees is + "R...
All of the things that you want to print need to be inside those brackets, as in

System.out.print ("Enter the service type:"
+ "R or r (regular), "
+ "P or p (premium): ");
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.