public class Foo {
private int x;
public Foo() {
this(1);
}
public Foo(int x) {
this.x = x;
}
}
To chain to a particular superclass constructor instead of one in the same class, use super instead of this. Note that you can only chain to one constructor, and it has to be the first statement in your constructor body.
See also this related question, which is about C# but where the same principles apply.
Best Answer
If you're using HtmlUnit then you should have an HtmlPage. There you can get an HtmlImage and save the file this way:
If you do have an URL... then I don't think you need HtmlUnit to download the image.