SuppressWarning
@SuppressWarnings instruct the compiler to ignore or suppress the specified compiler warning in annotated element and all program elements inside that element, as an example, if a class is annotated to suppress a particular warning, then a warning generated during the methodology inside that class will also be suppressed.
@SuppressWarnings("unchecked") and @SuppressWarnings("serial") are two of most popular samples of @SuppressWarnings annotation. Also if you limit the scope, this way it won’t even affect the entire method.
SuppressWarnings indicates the potential programming error or mistake, so it's recommended to use them slenderly and instead attempt to solve actual problem which is triggering that warning. But there are situations when you are absolutely sure that things won't go wrong, you can use @SuppressWarnings to suppress those warnings.