📜  java suppresswarnings unchecked - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:31.143000             🧑  作者: Mango

代码示例1
public class Machine {
    private List versions;

    @SuppressWarnings("unchecked")
    // or
    @SuppressWarnings({"unchecked"})
    public void addVersion(String version) {
        versions.add(version);
    }
}