Advanced Features in Java: Using Built-in Annotations
Java
| Expert
- 11 videos | 1h 23m 36s
- Includes Assessment
- Earns a Badge
In this course, you'll learn how annotations are defined and used in Java. You'll explore three popular built-in annotations, the @Override, @Deprecated, and @SuppressWarnings built-in annotations. Next, you'll examine how the @Override annotation is a valuable aid in detecting and fixing typos in the names of overridden methods, and crucially, helps to detect such issues at compile-time rather than at run-time. Then you'll explore the @Deprecated annotation and see how if you mark a class, method, or variable with the @Deprecated annotation, Java will issue an appropriate warning when you reference that element. You'll also learn about the @SuppressWarnings annotation, which does exactly what its name suggests, and for that reason ought to be used only with extreme caution, if at all. The @SuppressWarnings annotation allows the selective suppression of different types of warnings. You can also entirely eliminate all compiler warnings using @SuppressWarnings annotation with the all input argument, but this is quite dangerous and is an especially egregious programming practice.
WHAT YOU WILL LEARN
-
Discover the key concepts covered in this courseDefine a method, override it, and then mark that overridden version with the @override annotationApply the @override annotation to detect typographical errors in method names at compile-time rather than at run-timeRecognize different common overrides of methods in java.lang.object such as the .tostring, .equals, and .hashcode methodsIdentify correctly and incorrectly overridden implementations of the .equals methodRecognize how the @deprecated annotation can be used to flag the instantiation of objects of deprecated classes at compile-time
-
Analyze how the @deprecated annotation works on elements other than classesRecognize how the forremoval named element from the @deprecated annotation worksEnumerate different scenarios in which the @suppresswarnings annotation can be appliedRecognize the different warnings that can be eliminated using the @suppresswarnings annotation, and why this annotation ought to be used sparingly, if at allSummarize the key concepts covered in this course
IN THIS COURSE
-
2m 44s
-
8m 51sDuring this video, you will learn how to define a method, override it, and then mark that overridden version with the @Override annotation. FREE ACCESS
-
8m 37sIn this video, you will learn how to apply the @Override annotation to detect typographical errors in method names at compile time rather than at run time. FREE ACCESS
-
9mUpon completion of this video, you will be able to recognize different common overrides of methods in java.lang.Object, such as the .toString, .equals, and .hashCode methods. FREE ACCESS
-
6m 39sDuring this video, you will learn how to identify correctly and incorrectly overridden implementations of the .equals() method. FREE ACCESS
-
10m 46sAfter completing this video, you will be able to recognize how the @Deprecated annotation can be used to flag the instantiation of objects of deprecated classes at compile-time. FREE ACCESS
-
10m 58sIn this video, you will analyze how the @Deprecated annotation works on elements other than classes. FREE ACCESS
-
7m 34sAfter completing this video, you will be able to recognize how the forRemoval named element from the @Deprecated annotation works. FREE ACCESS
-
7m 23sFind out how to list different scenarios in which the @SuppressWarnings annotation can be applied. FREE ACCESS
-
8m 55sAfter completing this video, you will be able to recognize the different warnings that can be eliminated using the @SuppressWarnings annotation, and why this annotation should be used sparingly, if at all. FREE ACCESS
-
2m 9s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.