Java Programming and JSP Fundamentals
This test consists of questions related to programming languages and the database and compute networking concepts.
Questions
Which of the following is/are method(s) of Properties class in Java?
- storeToXML()
- store()
- setProperty()
- getProperty()
- all of the above
What is the use of isErrorPage attribute of page directive?
- It is used to declare that the current page is the error page.
- It is used to define the error page.
- It is used to redirect to the error page if the in case of exception occurs.
- All of the above
- Both (1) and (2)
Which of the following is not a component of HTTP request?
- URI (Uniform Resource Identifier)
- Entitiy body
- Request headers
- Response headers
- None of the above
Which of the following methods stores the entity body at the location specified by the URI?
- Post
- Get
- Put
- Head
- None of the above
Directives are used in JSP page at
- page translation time
- class loading time
- compilation time
- instantiation time
- none of the above
Which of the following layers is present in the middle of three-tier application architecture?
- Presentation layer
- Business logic layer
- Data layer
- Application layer
- None of the above
Which of the following exceptions is thrown by the clone() method in Java?
- ClassNotFoundException
- ClasssNotSupportedException
- IllegalAccessException
- ArithmaticException
- None of the above
Comparable interface belongs to _______ package in Java.
- java.lang
- java.util
- java.io
- java.net
- none of the above
Which of the following is/are method(s) of Component class in AWT (Abstract Window Toolkit)?
- add()
- setVisible()
- setLayout()
- all of the above
- both (1) and (2)
Which of the following methods of Map interface throw(s) NullPointerException in Java?
- public boolean containsValue(Object value)
- public boolean containsValue(Object key)
- boolean isEmpty()
- both (1) and (2)
- none of the above
Which of the following methods write(s) the properties in the OutputStream object?
- public void store(Writer w, String comment)
- public void store(OutputStream os, String comment)
- public void load(Reader r)
- both (1) and (2)
- none of the above
Which of the following is the correct syntax of put() method of Map interface in Java?
- public Object put(Object key, Map map)
- public Object put(Object key, Object value)
- public void put(Map map)
- public void put(Object key, Object value)
- none of the above
Which of the following methods returns value based on the key in the Properties class in Java?
- public String getProperty(String key)
- public void setProperty(String key, String value)
- public void load(Reader r)
- enumeration propertyNames( )
- none of the above
The default size of buffer attribute is ___in JSP.
- 8 kb
- 16 kb
- 12 kb
- 32 kb
- None of the above
Which of the following API's is used for application implicit object?
- HttpServletRequest
- HttpServletResponse
- Object
- PageContext
- None of the above
Which of the following is/are the drawback(s) of the two-tier application architecture?
- It is more costly.
- It has much traffic at client side.
- It causes the maintenance problem.
- All of the above
- Both (1) and (2)
Which of the following is/are JSP page directive(s)?
- extends
- autoFlush
- isELIgnored
- import
- all of the above
Which of the following is not a method of ServletContext interface?
- getInitParameter()
- getInitParameterNames()
- object getAttribute()
- removeAttribute()
- none of the above