Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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!