mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
correct {} placement when creating a new abstract class with constructor arguments
This commit is contained in:
+19
@@ -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();
|
||||
}
|
||||
+14
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user