mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-22 23:20:57 +07:00
for anonymous class this expressions have to be encoded to point to outer class, for lambda expressions there is no need for that. Leave unchanged (array initializer) for old java versions
11 lines
239 B
Java
11 lines
239 B
Java
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
private final Collection<Integer> collection = new ArrayList<>();
|
|
|
|
{
|
|
List<Integer> l = Collections.unmodifiableList((List<Integer>)this.collection);
|
|
System.out.println(l);
|
|
}
|
|
} |