This example is to show how to use @SuppressWarnings annotation to avoid compiler warnings in Java.
Source Code
package com.beginner.examples;
public class SuppressWarningsExample {
@SuppressWarnings("all")
public static void main(String[] args){
int a = 1;// a is unused
System.out.println("OK");
}
}
Output:
OK