Suppose you compile the following two classes. The first is intended to represent the client; the second is the library class.
public class Test{ public static void main(String[] args) { System.out.println(Lib.FIRST + " " + Lib.SECOND + " " + Lib.THIRD); } } public class Lib{ private Lib() { };
prints:
{zero set}
Now suppose you modify the library class as follows and recompile it, but not the client program:
public class Lib{ private Lib() { };
prints:
{chemistry set}
Why is the SECOND value changed, but not FIRST or THIRD ?
source share