Files
kotlin-fork/j2k/testData/fileOrElement/comments/commentsForConstructors.java
T
Alexander Udalov 3c859caf2b j2k: flatten test cases and testData directory structure
Move j2k/test/tests -> j2k/tests, j2k/test/testData -> j2k/testData
2015-01-03 00:52:59 +03:00

29 lines
542 B
Java

class A {
private int v;
// this is a primary constructor
A(int p) {
v = 1;
} // end of primary constructor body
// this is a secondary constructor 1
A() {
this(1);
} // end of secondary constructor 1 body
// this is a secondary constructor 2
A(String s) {
this(s.length());
} // end of secondary constructor 2 body
}
class B {
private int x;
// this constructor will disappear
B(int x) {
this.x = x;
} // end of constructor body
void foo(){}
}