Languages-Java [3i Infotech Placement]: Sample Questions 16 - 18 of 141

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 16

Edit

Describe in Detail

Essay▾

What is meant by servlet? What are the parameters of service method?

Explanation

Understanding of Servlet
  • A servlet is a java programming language class to extend the capabilities of servers that use request-response programming mode.
  • Servlet respond to requests and extend the applications hosted by web servers.
  • Java servlet technology defines HTTP-specific servlet classes with following methods:
    • int ()
    • service ()
    • getServletConfig ()
    • getServletInfo ()
    • destroy ()

Question 17

Edit

Describe in Detail

Essay▾

What are the corresponding layouts for card in swing?

Explanation

  • CardLayout are the corresponding layouts for card in swing.
  • The CardLayout class manages the components in such a manner that only one component is visible at a time.
  • Treats each component as a card that why it known as CardLayout.

Constructors of CardLayout class:

cardLayout ()

  • Creates a card layout with zero horizontal and vartical gap.
  • CardLayout (int hgap, int vgap)
  • Creates a card layout with the given horizontal and vertical gap.
The cardLayout ()

Question 18

Edit

Describe in Detail

Essay▾

Why there are some null interfaces in java? What does it mean? Give some null interface in JAVA?

Explanation

  • Null interfaces (or marker interfaces) mark the class that implements them.
  • When the JVM looks at a class it allows it to call certain methods based on markers.
  • All classes which inherit a class are able to call its methods.
  • However like virtual classes in C ++ all the functions of marker or null interface have to be implemented.

Some null interface in java:

Null Interface in Java

Developed by: