Java Java Data Structures Getting There Packages

Tony Capps
Tony Capps
2,123 Points

Syntax Error?

This is exactly like our example but still says its wrong..?

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 theBlog = new BlogPost();
    System.out.printf("This is a blog post: %s %n", theBlog);

  }
}
Ronald Greer
Ronald Greer
32,479 Points

Instead of “the blog” try “blogPost”

1 Answer

Tony Capps
Tony Capps
2,123 Points

What you name an item doesn't matter as long as you use the same name to reference it all the time.