Paper Tayyari

Lecture 36: JavaBeans

MCQs, short and long questions from lecture 36.Lecture 36 ki MCQs, short aur long sawal.

5 MCQs · 6 short · 4 long questions · 5 MCQs from past papers5 MCQs · 6 short · 4 long sawal · 5 MCQs past papers se

Start mock testMock test shuru karein
DoneHal kiye 0/5
– correctsahi
1.
★ Final term Fall 2008

A bean class ___________ have any public instance variables/attributes (fields).

  1. ACan
  2. BCan't
  3. CMust
  4. DShouldn't

Bean fields should be private and reached only through getters and setters.

2.
★ Final term Spring 2010

A bean class ___________ be serializable.

  1. ACan
  2. BCan't
  3. CMust
  4. DShouldn't

Bean conventions require the class to implement Serializable.

3.
★ Final term past paper

Which of the following is not a Java Bean class?

  1. AWhich have a zero argument constructor.
  2. BWhich have any public instance variables/attributes (fields).
  3. CWhose Private values are accessed through setters/getters.
  4. DWhich is serializable.

A JavaBean must not expose public fields; the other options are bean requirements.

4.
★ Final term past paper

JavaBean is a/an _________.

  1. ASpecial Java class
  2. BSpecial form of JSP
  3. Cxml file
  4. DServlet

A JavaBean is a Java class that follows special conventions (no-arg constructor, private fields, getters/setters).

5.
★ Final term past paper

A bean class __________ have a zero argument constructor.

  1. ACan
  2. BCan't
  3. CMust
  4. DShouldn't

JavaBean conventions require a public no-argument constructor.