From the course: Java: Testing with JUnit
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Annotations
- [Instructor] In this course, you will be using annotations a lot and they might look intimidating at first, you can recognize annotations by the at symbol that's in front of them. Once you get the hang of annotations, you find out that are not too bad. And the good news is that JUnit is using a lot of annotations, so you get the hang of these soon enough. They're simply some sort of meta data that you can use for your source code. We can use them for different purposes and chances are that you have seen and even used them already in your regular code. Let's move over to Intellij and have a look at some examples. One of the use cases for annotation is for example, to make rules for an interface that your compiler will take into account. This happens when you use the annotation at functional interface on top of an interface. This will make sure that the only one abstract method is allowed in this interface.…