mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-29 16:50:55 +07:00
18 lines
457 B
Java
18 lines
457 B
Java
import java.util.*;
|
|
public class MyEnum {
|
|
|
|
enum Test {A,B}
|
|
enum Test1 {A; Test1() {}}
|
|
|
|
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>;
|
|
Test1 t1 = <error descr="Enum types cannot be instantiated">new Test1()</error>;
|
|
} |