The primary key can’t be a primitive type–use the primitive wrapper classes, instead. For example, you can use java.lang.Integer as the primary key class, but not int (it has to be a class, not a primitive)
This site provides Java Tutorial, J2EE Tutorial, Spring Tutorial, Hibernate Tutorial, Struts Tutorial and Spring Tutorial. It has complete source code demonstration and Hello World excercise for Freshers and experienced IT Professionals.
Thursday, January 19, 2012
Java Interview Question and Java Beginner Tutorial - Part 11
Can the primary key in the entity bean be a Java primitive type such as int?
The primary key can’t be a primitive type–use the primitive wrapper classes, instead. For example, you can use java.lang.Integer as the primary key class, but not int (it has to be a class, not a primitive)
The primary key can’t be a primitive type–use the primitive wrapper classes, instead. For example, you can use java.lang.Integer as the primary key class, but not int (it has to be a class, not a primitive)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment