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 Basics Using your New Tools Coding the Prototype

error: ';' expected

console.printf("Finally it was %s's turn. ", candy bar); console.printf("She looked a little %s at first, but she performed her stunt so %s that the crowd gave her a(n) %s ovation!. ", negative adjective, adverb ending with -ly, verb ending with -ing); console.printf("When I heard the judges name my %s the winner, I picked her up and %s accross the stage. ", pet animal, past-tense verb); console.printf("But all the %s seemed to care about was her reward: a lifetime supply of %s!.\n", pet animal, pet food); }}

1 Answer

When posting code, it makes it much easier if you use the Markdown Cheatsheet for others to read.

Use the 3 backticks before and after your code. ```

Your code

console.printf("Finally it was %s's turn. ",
    candy bar);

console.printf("She looked a little %s at first, but she performed her stunt so %s that the crowd gave her a(n) %s ovation!. ", 
    negative adjective, 
    adverb ending with -ly, 
    verb ending with -ing);

console.printf("When I heard the judges name my %s the winner, I picked her up and %s accross the stage. ",
    pet animal,
    past-tense verb);

console.printf("But all the %s seemed to care about was her reward: a lifetime supply of %s!.\n",
    pet animal,
    pet food); 

Problem

I believe the issue with your code is your arguments, you need to either set a variable for them or put quotations around them.

String printArgument = "arguments";
console.printf("String Format goes here with whatever %s you like.", 
  printArgument );

console.printf("However this is also an acceptable %s.",
  "argument when in quotations" );

Solution

console.printf("Finally it was %s's turn. ",
    "candy bar");

console.printf("She looked a little %s at first, but she performed her stunt so %s that the crowd gave her a(n) %s ovation!. ", 
    "negative adjective", 
    "adverb ending with -ly", 
    "verb ending with -ing");

console.printf("When I heard the judges name my %s the winner, I picked her up and %s accross the stage. ",
    "pet animal",
    "past-tense verb");

console.printf("But all the %s seemed to care about was her reward: a lifetime supply of %s!.\n",
    "pet animal",
    "pet food"); 

Thank you it works!