mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-03 15:50:52 +07:00
32 lines
819 B
Java
32 lines
819 B
Java
class UnusedDeclBug {
|
|
|
|
public static enum Concern {
|
|
// These fields are used! Just because I don't mention them by name
|
|
// doesn't mean they aren't used!
|
|
// IDEA tells me I need: @SuppressWarnings({"UnusedDeclaration"})
|
|
LOW,
|
|
MEDIUM,
|
|
HIGH;
|
|
};
|
|
|
|
public static void main(String[] args) {
|
|
System.out.println("Concerns are:");
|
|
|
|
// Invoking Concern.values() should count as using all the fields in the
|
|
// enum.
|
|
for (Concern concern : Concern.values()) {
|
|
System.out.print("\t");
|
|
System.out.println(concern);
|
|
} // end for
|
|
}
|
|
}
|
|
|
|
class ForEachTest {
|
|
public static void main(String[] args) {
|
|
int count = 0;
|
|
for (String ignore : args) {
|
|
count++;
|
|
}
|
|
System.out.println(count);
|
|
}
|
|
} |