Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java call another constructor

public class Foo {
    private int x;

    public Foo() {
        this(1);
    }

    public Foo(int x) {
        this.x = x;
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #call #constructor
ADD COMMENT
Topic
Name
1+7 =