I ran into this block of code, and there is this one line I don\'t quit understand the meaning or what it is doing.
public Digraph(In in) {
this(in.readI
This code snippet is a constructor.
This call to this calls another constructor of the same class
public App(int input) {
}
public App(String input) {
this(Integer.parseInt(input));
}
In the above example we have a constructor that takes an int and one that takes a String. The constructor that takes a String converts the String to an int and then delegates to the int constructor.
Note that a call to another constructor or a superclass constructor (super()) must be the first line in a constructor.
Maybe take a look at this for a more detailed explanation of constructor overloading.