SuppressWarnings is used to suppress compiler warnings.
You can apply @SuppressWarnings to types, constructors, methods, fields, parameters, and local variables.
The following are valid parameters to @SuppressWarnings:
- unchecked. Give more detail for unchecked conversion.
- path. Warn about nonexistent path (classpath, sourcepath, etc) directories.
- serial. Warn about missing serialVersionUID definitions on serializable classes.
- finally. Warn about finally clauses that cannot complete normally.
- fallthrough. Check switch blocks for fall-through cases.
switch (i) {
case 1:
System.out.println("1");
break;
case 2:
System.out.println ("2");
// falling through
case 3:
System.out.println ("3");
}