Java by API/java.lang/SuppressWarnings

Материал из Java эксперт
Перейти к: навигация, поиск

java.lang.SuppressWarnings (named compiler warnings should be suppressed)

     
import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
@SuppressWarnings (value={"unchecked", "serial"})
public class Main implements Serializable {
    public void openFile () {
        ArrayList a = new ArrayList ();
        File file = new File ("X:/java/doc.txt");
    }
}