Rafał Stasiak3,762 Points
After uncomment ther is syntax error.
Hello, After rechecking work I get below syntax error. Can someone help with fixing my code?
./Main.java:11: error: constructor Forum in class Forum cannot be applied to given types; Forum forum = new Forum("Java"); ^ required: no arguments found: String reason: actual and formal argument lists differ in length Note: JavaTester.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
Daniel TuratoJava Web Development Techdegree Graduate 30,116 Points
A few things, make sure you uncommented the code in Forum. Also, the author object needs to be created by using the values passed in args like so:
Forum forum = new Forum("Java"); // TODO: pass in the first name and last name that are in the args parameter User author = new User(args, args); // TODO: initialize the forum post with the user created above and a title and description of your choice ForumPost post = new ForumPost(author, "test", "test"); forum.addPost(post);