mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
22 lines
461 B
Java
22 lines
461 B
Java
|
|
import java.util.ArrayList;
|
|
import java.util.Collection;
|
|
|
|
public class ExtractVariableSample {
|
|
|
|
public static void main(String[] args) {
|
|
Collection<String> strings = new ArrayList<>();
|
|
new Object() {
|
|
public void foo(String s) {
|
|
System.out.println( s.hashCode());
|
|
}
|
|
};
|
|
|
|
for (String s : strings) {
|
|
int j = s.hashCode();
|
|
System.out.println(j);
|
|
}
|
|
}
|
|
|
|
|
|
} |