Java Web Programming Fundamentals

Covers Java web technologies including servlets, applets, AWT/Swing components, event listeners, and basic HTTP handling. Good foundation for understanding client and server-side Java programming.

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following methods of SmashTransition.java class modifies the work_pixels array for the next cell?

  1. init()
  2. Smash()
  3. setupFillPixels()
  4. Tear()
  5. createUnrollAmountArray()
Question 2 Multiple Choice (Single Answer)

Which of the following methods of mouse sends the browser to the URL that corresponds to the currently selected menu item?

  1. mouseExited()
  2. mouseDragged()
  3. mouseMoved()
  4. mouseReleased()
  5. mouseTrace()
Question 3 Multiple Choice (Single Answer)

Which of the following interfaces defined in java.beans package allows a bean to execute in environments where a graphical user interface is not available?

  1. Appletinitializer
  2. DesignMode
  3. Visibility
  4. Customizer
  5. BeanInfo
Question 4 Multiple Choice (Single Answer)

Which of the following interfaces of javax.servlet package indicates that the servlet is thread safe?

  1. ServletResponse
  2. SingleThreadModel
  3. ServletRequest
  4. Servlet
  5. destroy()
Question 5 Multiple Choice (Single Answer)

Which of the following tags of javadoc utility states the release when a specific change was introduced?

  1. @since
  2. @author
  3. @param
  4. @see
  5. @return
Question 6 Multiple Choice (Single Answer)

Which of the following is an interface for objects that want to produce data for images?

  1. MemoryImageSource
  2. ImageProducer
  3. ImageConsumer
  4. PixelGrabber
  5. CropImageFilter
Question 7 Multiple Choice (Single Answer)

Which of the following interfaces consists of methods to recognize when a window is activated, closed, deactivated or quit in the applet?

  1. TextListener
  2. MouseListener
  3. WindowListener
  4. ItemListener
  5. FocusListener
Question 8 Multiple Choice (Single Answer)

Which of the following interfaces is used in Java whenever a user wants a component to be resized, moved, shown or hidden in an applet?

  1. ActionListener
  2. AdjustmentListener
  3. ComponentListener
  4. ContainerListener
  5. FocusListener
Question 9 Multiple Choice (Single Answer)

Which of the following item events generates text events when the user enters a character?

  1. Scroll Bar
  2. Button
  3. Checkbox
  4. Text Component(s)
  5. Choice
Question 10 Multiple Choice (Single Answer)

Which of the following methods of an applet is called each time your applet's output must be redrawn?

  1. start()
  2. init()
  3. paint()
  4. stop()
  5. destroy()
Question 11 Multiple Choice (Single Answer)

Which of the following classes in Java servlets provides an input stream for reading requests from a client?

  1. GenericServlet
  2. ServletInputStream
  3. ServletOutputStream
  4. ServletException
  5. Servlet
Question 12 Multiple Choice (Single Answer)

Which of the following classes in Servlets provides methods to handle HTTP requests and responses?

  1. Cookie
  2. HttpSessionBindingEvent
  3. HttpServlet
  4. HttpUtils
  5. HttpSessionContext
Question 13 Multiple Choice (Single Answer)

Which of the following features is available in Java?

  1. Java supports structures or unions.
  2. Java allows the use of default arguments.
  3. Java includes preprocessor and support the preprocessor directives.
  4. Java supports typedef.
  5. Java supports use of applets.
Question 14 Multiple Choice (Single Answer)

Which of the following methods of ServletRequest class is used to return the string equivalent of the client host name?

  1. getParameter()
  2. getScheme()
  3. getServerPort()
  4. getRemoteHost()
  5. getServerName()
Question 15 Multiple Choice (Single Answer)

Which of the following methods of the HttpSevletResponse interface is used to write a cookie to a users machine?

  1. containsHeader()
  2. encodeURL()
  3. addCookie()
  4. getMethod()
  5. getRemoteUser()