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 trialM. Brown
29,923 PointsI'm posting another topic of this because I still don't have an answer.
And a week later no one has answered it and I'm not able to bump it up either...
@Retention(LiveTweet = RetentionPolicy.RUNTIME)
2 Answers
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsHave you watched a previous video
As you at second 00:10 he is writing Doc
annotation.
You declare it as a class but with @interface
keyword instead of class, does it make sense ?
What you are writing is not a declaration of annotation LiveTweet
, but you write annotation to annotation that we can apply to other annotation...
Does that sound helpful ?
M. Brown
29,923 PointsI read the other topic and they were saying to start around 0:50. This is as much as I got from it. I will attempt again.
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsOk. It seems that you have enough of this. The answer to the first challenge is
public @interface LiveTweet {
}
As you see we declare an annotation called LiveTweet
in file called LiveTweet.java
using @interface
and name of the annotation after all.
Now try the second challenge
M. Brown
29,923 PointsM. Brown
29,923 PointsThis is what I have now:
import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy;
@Retention(LiveTweet = RetentionPolicy.RUNTIME) public @interface doc {
}
Still don't have it....