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

Bracket errors in compiler?

Not sure why my brackets are red and my leading Class bracket is highlighted red, paired with the end bracket of my final method. I tried to clear all brackets to redo them and still nothing.

import com.teamtreehouse.model.Song;
import com.teamtreehouse.model.SongBook;

public Class Karaoke { 

  public static void main(String[] args) { 
    Song song = new Song(
      "Michael Jackson",
      "Beat It";
      "https://www.youtube.com/watch?v=SaEC9i9QOvK");

    SongBook songBook = new SongBook();
    System.out.printf(Adding %s %n", song);
    songBook.addSong(song);
    System.out.printf("There are %d songs. %n",
                       songBook.getSongCount());
    }  

  }

3 Answers

Hi Blake.

I guess you are missing an (") in:

//ORIGINAL -> System.out.printf(Adding %s %n", song);
 System.out.printf("Adding %s \n", song);  // <- CORRECT

the (%n) is doing nothing there, if you want to add a next line the correct way is to add a (\n) not a (%n).

ALSO there is a (;) out of place

/* ORIGINAL
    Song song = new Song(
      "Michael Jackson",
      "Beat It";
      "https://www.youtube.com/watch?v=SaEC9i9QOvK");
*/

//CORRECT
Song song = new Song(
      "Michael Jackson",
      "Beat It",
      "https://www.youtube.com/watch?v=SaEC9i9QOvK");

Nope it's there. It has done it on my Karaoke and Song class where there errors are on the bracket lines.

Sorry for the edits, was adding stuff as i was reading the code more carefully, the bracket problem should have been because of that (;) out of plase that should be a (,)

I might just launch a new workspace and start over because I think its just glitched out. It says I have 9 errors.