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 trialsuryansh
5,993 PointsChallenge won't accept the correct answer
I have been stuck at this code challenge for about an hour now and I can't seem to figure out the correct answer. Oh wait, what I've written IS the correct answer. I don't understand why it won't accept it. I even re-watched the video regarding this and this is the correct code.
Any answer is appreciated! Thank you!
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
public @interface LiveTweet {
String username() default "";
String[] hastags() default {};
}
1 Answer
Philip Gales
15,193 PointsYou misspelled "hashtags" :)
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
public @interface LiveTweet {
String username() default "";
String[] hashtags() default {};
}
suryansh
5,993 Pointssuryansh
5,993 Pointskill me...
Philip Gales
15,193 PointsPhilip Gales
15,193 Pointshaha, it's always something obvious.