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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Mher Allahverdi](https://secure.gravatar.com/avatar/d6e187cadcec8ae6ae350f76d8defd5f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Mher Allahverdi
1,686 PointsWhat went wrong here?
Javac Example.java didn't have any issues with the code but something went wrong as soon as you run it:
This is a new Treet: Exception in thread "main" java.util.MissingFormatArgumentException: Format specifier '%s'
at java.util.Formatter.format(Formatter.java:2519)
at java.util.Formatter.format(Formatter.java:2455)
at java.lang.String.format(String.java:2940)
at com.teamtreehouse.Treet.toString(Treet.java:18)
at java.util.Formatter$FormatSpecifier.printString(Formatter.java:2886)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2763)
at java.util.Formatter.format(Formatter.java:2520)
at java.io.PrintStream.format(PrintStream.java:970)
at java.io.PrintStream.printf(PrintStream.java:871)
at Example.main(Example.java:24)
Also can someone show me how to link my code properly like other people's questions :]? I mean the snapshot works too but it seems like everyone posts their questions the other way.
2 Answers
![KRIS NIKOLAISEN](https://secure.gravatar.com/avatar/65d74a723997b41a80d2d909c6e06960?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
KRIS NIKOLAISEN
54,969 PointsIn Treet.java you have a + instead of a comma before mDescription here:
@Override
public String toString () {
return String.format ("Treet: \"%s\" by %s on %s",
mDescription, mAuthor, mCreationDate);
}
![Jason Anders](https://uploads.teamtreehouse.com/production/profile-photos/3512822/micro_Jason_s-Pic.jpg)
Jason Anders
Treehouse Moderator 145,859 Points[edited]
To format code for the Community, you'll need to use Markdown. There is a Cheatsheet link above the Post button, or you can take the quick Markdown Basics Course here on Treehouse.
Hope you get it solved soon.
:)
Mher Allahverdi
1,686 PointsMher Allahverdi
1,686 PointsAwesome! Thank you very much Kris :D