Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Java Objects Meet Objects Final

workspace keep showing error

I fixed everything, cod looks exactly as on video, but i still do not get result and console still showing errors like this: Example.java:11: error: unclosed string literal
System.out.printf("It was %s but Chris switched it to %s %n,
^
Example.java:11: error: ';' expected
System.out.printf("It was %s but Chris switched it to %s %n,
^
Example.java:12: error: illegal start of expression
before,
^
Example.java:13: error: ';' expected
dispenser.getCharacterName());
^
Example.java:13: error: ';' expected
dispenser.getCharacterName());

2 Answers

Its hard to see the erro without a workspace attached or format code but as far as i see ur missing a semi-colon here:

System.out.printf("It was %s but Chris switched it to %s %n",dispenser.getCharacterName());

Actually i figured it out already it was < " > missing, thank you!