Advanced Features in Java: Using Built-in Annotations

Java    |    Expert
  • 11 videos | 1h 23m 36s
  • Includes Assessment
  • Earns a Badge
Rating 5.0 of 3 users Rating 5.0 of 3 users (3)
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 course
    Define a method, override it, and then mark that overridden version with the @override annotation
    Apply the @override annotation to detect typographical errors in method names at compile-time rather than at run-time
    Recognize different common overrides of methods in java.lang.object such as the .tostring, .equals, and .hashcode methods
    Identify correctly and incorrectly overridden implementations of the .equals method
    Recognize 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 classes
    Recognize how the forremoval named element from the @deprecated annotation works
    Enumerate different scenarios in which the @suppresswarnings annotation can be applied
    Recognize the different warnings that can be eliminated using the @suppresswarnings annotation, and why this annotation ought to be used sparingly, if at all
    Summarize the key concepts covered in this course

IN THIS COURSE

  • 2m 44s
  • 8m 51s
    During this video, you will learn how to define a method, override it, and then mark that overridden version with the @Override annotation. FREE ACCESS
  • Locked
    3.  Using @Override to Protect Against Typos
    8m 37s
    In 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
  • Locked
    4.  Overriding the .toString, .equals, and .hashCode Methods
    9m
    Upon 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
  • Locked
    5.  Correctly Overriding the .equals Method
    6m 39s
    During this video, you will learn how to identify correctly and incorrectly overridden implementations of the .equals() method. FREE ACCESS
  • Locked
    6.  Introduction to the @Deprecated Annotation
    10m 46s
    After 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
  • Locked
    7.  More Uses of the @Deprecated Annotation
    10m 58s
    In this video, you will analyze how the @Deprecated annotation works on elements other than classes. FREE ACCESS
  • Locked
    8.  The forRemoval Element from the @Deprecated Annotation
    7m 34s
    After completing this video, you will be able to recognize how the forRemoval named element from the @Deprecated annotation works. FREE ACCESS
  • Locked
    9.  The @SuppressWarnings Annotation
    7m 23s
    Find out how to list different scenarios in which the @SuppressWarnings annotation can be applied. FREE ACCESS
  • Locked
    10.  Usage Scenarios of the @SuppressWarnings Annotation
    8m 55s
    After 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
  • Locked
    11.  Course Summary
    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.

YOU MIGHT ALSO LIKE

Rating 4.6 of 213 users Rating 4.6 of 213 users (213)
Rating 4.6 of 171 users Rating 4.6 of 171 users (171)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.4 of 33 users Rating 4.4 of 33 users (33)
Rating 4.7 of 28 users Rating 4.7 of 28 users (28)
Rating 4.7 of 13 users Rating 4.7 of 13 users (13)