0

Test 1 Applets and Servlets

Description: Test your knowledge of Java applets
Number of Questions: 15
Created by:
Tags: Applets Java Programming
Attempted 0/15 Correct 0 Score 0

___________ interface allows a designer to provide a graphical user interface through which bean may be configured.

  1. Customizer

  2. AppletInitializer

  3. BeanInfo

  4. DesignMode

  5. PropertyEditor


Correct Option: A
Explanation:

This interface allows a designer to provide a graphical user interface through which bean may be configured.

Which of the following interfaces in Java Beans API allows a designer to specify information about the properties, events and methods of a bean?

  1. Customizer

  2. Visibility

  3. BeanInfo

  4. DesignMode

  5. None of these


Correct Option: C
Explanation:

This interface in Java Beans API allows a designer to specify information about the properties, events and methods of a bean.

Which of the following methods in Applet programming is used to extract the name part of an item from the class and return it?

  1. stop()

  2. getName()

  3. accept()

  4. chat()

  5. move()


Correct Option: B
Explanation:

This method in Applet programming is used to extract the name part of the item and return it.

Which of the following classes in servlets implements the Servlet and ServletConfig interface?

  1. ServletOutputStream

  2. ServletInputStream

  3. GenericServlet

  4. ServletException

  5. None of these


Correct Option: C
Explanation:

This class in servlets implements the Servlet and ServletConfig interface.

The methods wait() and notify() are defined in

  1. java.lang.Runnable

  2. java.lang.Thread

  3. java.lang.Object

  4. java.lang.ThreadGroup

  5. none of the above


Correct Option: C
Explanation:

these are the members of Object class

Which of the following classes in servlet developers extends in order to process HTTP request that allows state information to be stored on a client's machine?

  1. HttpServlet

  2. HttpSessionBindingEvent

  3. HttpUtils

  4. Cookie

  5. None of these


Correct Option: D
Explanation:

This class in servlet developer allows state information to be stored on a client machine.

_______________ Servlet interface method is called when the servlet is unloaded.

  1. void destroy()

  2. string getServletInfo()

  3. string getScheme()

  4. int getServerPort()

  5. string getServerName()


Correct Option: A
Explanation:

This servlet interface method is called when the servlet is unloaded.

In imageIcon class, which of the following methods returns the width of the icon in pixels?

  1. getIconHeight()

  2. paintIcon()

  3. getIconWidth()

  4. none of these


Correct Option: C
Explanation:

This method in ImageIcon class returns the width of the icon in pixels.

Which of the following parameters in the applet specifies the number of milliseconds between each billboard?

  1. bgcolor

  2. billboards

  3. delay

  4. none of these


Correct Option: C
Explanation:

This parameter in the applet specifies the number of milliseconds between each billboard.

Which of the following methods is used in image processing of applet to modify the work_pixels array for the next cell?

  1. smash()

  2. setupFillPixels()

  3. createRandomArray()

  4. none of these


Correct Option: A
Explanation:

This method is used in image processing of applet to modify the work_pixels array for the next cell.

Which of the following methods in applet programming is used to create and initialize the next billboard object that the applet will use?

  1. init()

  2. parseBillData()

  3. mouseMoved()

  4. none of these


Correct Option: B
Explanation:

This method in applet programming is used to create and initialize the next billboard object that the applet will use.

Which of the following methods in HttpServletRequest returns any query string in the URI?

  1. String getMethod()

  2. String getQueryString()

  3. String getPathInfo()

  4. String getRemoteUser()

  5. String getRequestURI()


Correct Option: B
Explanation:

 String getQueryString() : This interface in HttpServletRequest returns any query string in the URI.

Which of the following interfaces of Java servlets allows servlets to get initialization parameters?

  1. ServletConfig

  2. ServletContext

  3. Servlet

  4. ServletRequest

  5. ServletResponse


Correct Option: A
Explanation:

This interface of Java servlets allows servlets to get initialization parameters.

Which of the following in java.beans analyses a bean and constructs a BeanInfo object that describes the component?

  1. MethodDescriptor

  2. ParameterDescriptor

  3. Introspector

  4. PropertyDescriptor


Correct Option: C
Explanation:

This class analyses a bean and constructs a BeanInfo object that describes the component.

Which of the following classes in Java contains swing version of an applet?

  1. JButton

  2. JCheckBox

  3. JApplet

  4. AbstractButton

  5. JLabel


Correct Option: C
Explanation:

This class in java contains swing version of applet.

- Hide questions