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

Im suppose to un-comment code in the Forum and Main class, however is has been giving me issues from the get go...

public class Main {

public static void main(String[] args) { System.out.println("Beginning forum example"); if (args.length < 2) { System.out.println("Usage: java Main <first name> <last name>"); System.err.println("<first name> and <last name> are required"); System.exit(1); } Forum forum = new Forum("Java"); // TODO: pass in the first name and last name that are in the args parameter User author = new User("Thando","Bhebhe"); // TODO: initialize the forum post with the user created above and a title and description of your choice ForumPost post = new ForumPost("author","Car","green car"); forum.addPost(post);

}

}

1 Answer

Your challenge is to pass what's in the args[] array given. So when creating a new User you pass args[0], args[1]. I also noticed in the ForumPost you pass "author" it should be without the quotation marks because it is expecting a User , and not a String if I remember correctly.

thanks man, made it through