The following is a paraphrase of someone else's code. In this example, what exactly is chessSolver
and how would you use it? It looks like a variable that's being assigned to a new instance of its own class (Game
) which seems to be overriding a method (solver()
).
public class Game {
protected solver(){}; // Will be overridden
protected final static Game chessSolver =
new Game() {
protected void solver() {
/*...*/
};
};
}