Multiple choice technology web technology

A Bean class

  1. must have empty constructor

  2. should have no public fields

  3. Both a and b

  4. None of a and b

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

Java Beans must have a no-argument constructor (empty constructor) to enable instantiation by containers and frameworks. They should follow encapsulation principles by having no public fields - all data access should be through getter and setter methods. Both requirements are part of the Java Bean specification, making option C correct.