Created only a method in User.java.