Implementing inheritance in Hibernate by R4R Team

A subclass must also observe the first and second rules. It inherits its identifier property from the superclass, Student. 

For example:

package r4r;
public class DomesticStudent extends Student
 {
        private String name;

        public String getName() {
                return name;
        }
        protected void setName(String name) {
                this.name=name;
        }
}
Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!