Multiple choice technology web technology

Which statement is correct?

  1. bag has index column

  2. bag permits duplicate element values

  3. bag does not permits duplicate element values

  4. None

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

A 'bag' in Hibernate is a collection that ALLOWs duplicate elements and does not maintain element order (no index column). Unlike Lists (which have indexes) or Sets (which enforce uniqueness), bags can contain duplicates.

AI explanation

To answer this question, you need to understand the concept of a bag data structure.

A bag is a collection of elements where duplicate elements are allowed. Therefore, the correct statement is:

Option B) A bag permits duplicate element values - This statement is correct because a bag allows multiple occurrences of the same element.