In UserInformation.toString() call super.toString() and then append the stuff you currently have in UserInformation.toString().
When one class extends another class and they both have a method of the same name and signature, such as toString(), the sub-class's toString() will get called instead of the super-class's IF you've given it a sub-class object to operate on.
GeneralInformation is your super-class
UserInformation is your sub-class
You construct a UserInformation object - so therefore the UserInformation.toString() is the one that gets called instead of the super class's toString(). If you ALSO want to call the super-class's toString() method you have to do that explicitly with super.toString() which returns a String.
Nothing happen I was got the same output but carey was right because when I comment tostring method which was in user information then It show tostring method which was in general information or vise versa..