correct {} placement when creating a new abstract class with constructor arguments

This commit is contained in:
peter
2010-04-12 19:31:27 +04:00
parent 8db6de961d
commit 16ecaebf9b
4 changed files with 40 additions and 2 deletions
@@ -0,0 +1,19 @@
public class Main {
public static void main(String[] args) {
Bar b = new Bar() {
@Override
void update() {
<selection>//To change body of implemented methods use File | Settings | File Templates.</selection>
}
};
}
}
public abstract class Bar {
protected Bar(int a) {
}
abstract void update();
}
@@ -0,0 +1,14 @@
public class Main {
public static void main(String[] args) {
Bar b = new B<caret>
}
}
public abstract class Bar {
protected Bar(int a) {
}
abstract void update();
}