mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
25 lines
429 B
Java
25 lines
429 B
Java
public class Foo {
|
|
|
|
private int counter;
|
|
|
|
public Foo(int initialCounter) {
|
|
this.counter = initialCounter;
|
|
}
|
|
|
|
void <caret>toBeRefactored() {
|
|
new Foo(counter + 10) {
|
|
void toImplement() {
|
|
toCall();
|
|
}
|
|
}.toImplement();
|
|
}
|
|
|
|
void toCall() {
|
|
System.out.println("Counter: " + counter);
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
Foo foo = new Foo(5);
|
|
foo.toBeRefactored();
|
|
}
|
|
} |