Java Java Data Structures Getting There Packages

Abdurahman Osman
Abdurahman Osman
5,762 Points

i dont know what im missing in this program,the error it gives me is the open braces in line three

thanks in advance

com/example/BlogPost.java
package com.example;
public class BlogPost {
  {
Display.java
import com.example.BlogPost;
public class Display {
  public static void main(String[] args){
    BlogPost blogpost = new BlogPost ();
    System.out.printf("this si a blogpost :%s",blogpost);
  }
}

1 Answer

Steve Hunter
MOD
Steve Hunter
Treehouse Moderator 56,759 Points

Hi there,

Your BlogPost class doesn't have a closing curly brace. Change:

package com.example;
public class BlogPost {
  {

to

package com.example;
public class BlogPost {
}  // <- closing brace

I hope that helps,

Steve.