mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-11 11:36:59 +07:00
16 lines
345 B
Java
16 lines
345 B
Java
import java.util.*;
|
|
public class MyEnum {
|
|
|
|
enum Test {A,B}
|
|
|
|
public static Test[] accepted1() {
|
|
List<Test> list = new ArrayList<Test>();
|
|
return list.toArray(new Test[list.size()]);
|
|
}
|
|
|
|
public static Test[] accepted2() {
|
|
return new Test[]{};
|
|
}
|
|
|
|
Test t = <error descr="Enum types cannot be instantiated">new Test()</error>;
|
|
} |