Files
kotlin-fork/j2k/testData/fileOrElement/comments/commentsForConstructors.java
T
2015-09-18 15:44:18 +03:00

29 lines
549 B
Java
Vendored

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
public B(int x) {
this.x = x;
} // end of constructor body
void foo(){}
}