0

J2EE Applications

Description: J2EE Applications Test covers important questions of Java, interview questions, Practice test, java preparation
Number of Questions: 15
Created by:
Tags: Java Test JAVA questions JAVA interview preparation JAVA practice questions J2EE Applications Android Test Java/Oracle /C/C++
Attempted 0/15 Correct 0 Score 0

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()


Correct Option: B
Explanation:

This method of SmashTransition.java class modifies the work_pixels array for the next cell.

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()


Correct Option: D
Explanation:

This mouse method sends the browser to the URL that corresponds to the currently selected menu item.

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


Correct Option: C
Explanation:

This interface defined in java.beans package allows a bean to execute in environments where a graphical user interface is not available.

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()


Correct Option: B
Explanation:

This interface of javax.servlet package indicates that the servlet is thread safe.

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


Correct Option: A
Explanation:

This tag of javadoc utility states the release when a specific change was introduced.

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


Correct Option: B
Explanation:

This is an interface for objects that want to produce data for images.

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


Correct Option: C
Explanation:

This interface consist of methods to recognize when a window is activated, closed, deactivated or quit in the applet.

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


Correct Option: C
Explanation:

This interface is used in java whenever a user wants a component to be resized, moved, shown or hidden in an applet.

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


Correct Option: D
Explanation:

This item events generates text events when the user enters a character.

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()


Correct Option: C
Explanation:

This method of an applet is called each time your applets output must be redrawn.

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


Correct Option: B
Explanation:

This class in java servlets provides an input stream for reading requests from a client.

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


Correct Option: C
Explanation:

This class in Servlets provides methods to handle HTTP requests and responses.

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.


Correct Option: E
Explanation:

This is the correct option as java supports the concept of applets.

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()


Correct Option: D
Explanation:

This method of ServletRequest class is used to return the string equivalent of the client host name.

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()


Correct Option: C
Explanation:

This method of the HttpSevletResponse interface is used to write a cookie to a users machine.

- Hide questions