Multiple choice technology architecture

We can use any java primitive types as entity bean primary key field.

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Entity bean primary keys must be serializable and comparable to support caching and database operations. The answer is False because Java primitive types (int, long, etc.) are not objects and cannot be used directly. Instead, you must use wrapper classes (Integer, Long, String) or custom primary key classes that implement Serializable. The container needs to handle primary keys as objects for operations like findByPrimaryKey.