I would say you returning your attribute of the class which is not changed, whenever trying to do : System.out.println(P.getE());. The first output is from method setE(int e), is...