What’s the difference between interface and @interface in java?

I haven’t touched Java since using JBuilder in the late 90’s while at University, so I’m a little out of touch – at any rate I’ve been working on a small Java project this week, and using Intellij IDEA as my IDE, for a change of pace from my regular .Net development.

I notice it has support for adding interfaces and @interfaces, what is an @interface, and how does it differ from a normal interface?

public interface Test {
}

vs.

public @interface Test {
}

I’ve done a bit of searching, but couldn’t find a great deal of useful info referring to @interface.

5 Answers
5

Leave a Comment