Java Programming and JSP Fundamentals

This test consists of questions related to programming languages and the database and compute networking concepts.

18 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following is/are method(s) of Properties class in Java?

  1. storeToXML()
  2. store()
  3. setProperty()
  4. getProperty()
  5. all of the above
Question 2 Multiple Choice (Single Answer)

What is the use of isErrorPage attribute of page directive?

  1. It is used to declare that the current page is the error page.
  2. It is used to define the error page.
  3. It is used to redirect to the error page if the in case of exception occurs.
  4. All of the above
  5. Both (1) and (2)
Question 3 Multiple Choice (Single Answer)

Which of the following is not a component of HTTP request?

  1. URI (Uniform Resource Identifier)
  2. Entitiy body
  3. Request headers
  4. Response headers
  5. None of the above
Question 4 Multiple Choice (Single Answer)

Which of the following methods stores the entity body at the location specified by the URI?

  1. Post
  2. Get
  3. Put
  4. Head
  5. None of the above
Question 5 Multiple Choice (Single Answer)

Directives are used in JSP page at

  1. page translation time
  2. class loading time
  3. compilation time
  4. instantiation time
  5. none of the above
Question 6 Multiple Choice (Single Answer)

Which of the following layers is present in the middle of three-tier application architecture?

  1. Presentation layer
  2. Business logic layer
  3. Data layer
  4. Application layer
  5. None of the above
Question 7 Multiple Choice (Single Answer)

Which of the following exceptions is thrown by the clone() method in Java?

  1. ClassNotFoundException
  2. ClasssNotSupportedException
  3. IllegalAccessException
  4. ArithmaticException
  5. None of the above
Question 8 Multiple Choice (Single Answer)

Comparable interface belongs to _______ package in Java.

  1. java.lang
  2. java.util
  3. java.io
  4. java.net
  5. none of the above
Question 9 Multiple Choice (Single Answer)

Which of the following is/are method(s) of Component class in AWT (Abstract Window Toolkit)?

  1. add()
  2. setVisible()
  3. setLayout()
  4. all of the above
  5. both (1) and (2)
Question 10 Multiple Choice (Single Answer)

Which of the following methods of Map interface throw(s) NullPointerException in Java?

  1. public boolean containsValue(Object value)
  2. public boolean containsValue(Object key)
  3. boolean isEmpty()
  4. both (1) and (2)
  5. none of the above
Question 11 Multiple Choice (Single Answer)

Which of the following methods write(s) the properties in the OutputStream object?

  1. public void store(Writer w, String comment)
  2. public void store(OutputStream os, String comment)
  3. public void load(Reader r)
  4. both (1) and (2)
  5. none of the above
Question 12 Multiple Choice (Single Answer)

Which of the following is the correct syntax of put() method of Map interface in Java?

  1. public Object put(Object key, Map map)
  2. public Object put(Object key, Object value)
  3. public void put(Map map)
  4. public void put(Object key, Object value)
  5. none of the above
Question 13 Multiple Choice (Single Answer)

Which of the following methods returns value based on the key in the Properties class in Java?

  1. public String getProperty(String key)
  2. public void setProperty(String key, String value)
  3. public void load(Reader r)
  4. enumeration propertyNames( )
  5. none of the above
Question 14 Multiple Choice (Single Answer)

The default size of buffer attribute is ___in JSP.

  1. 8 kb
  2. 16 kb
  3. 12 kb
  4. 32 kb
  5. None of the above
Question 15 Multiple Choice (Single Answer)

Which of the following API's is used for application implicit object?

  1. HttpServletRequest
  2. HttpServletResponse
  3. Object
  4. PageContext
  5. None of the above
Question 16 Multiple Choice (Single Answer)

Which of the following is/are the drawback(s) of the two-tier application architecture?

  1. It is more costly.
  2. It has much traffic at client side.
  3. It causes the maintenance problem.
  4. All of the above
  5. Both (1) and (2)
Question 17 Multiple Choice (Single Answer)

Which of the following is/are JSP page directive(s)?

  1. extends
  2. autoFlush
  3. isELIgnored
  4. import
  5. all of the above
Question 18 Multiple Choice (Single Answer)

Which of the following is not a method of ServletContext interface?

  1. getInitParameter()
  2. getInitParameterNames()
  3. object getAttribute()
  4. removeAttribute()
  5. none of the above