Tag: programming languages

Questions Related to programming languages

Is Prepared statement a precomplied SQL statement?

  1. True

  2. False


Correct Option: A
  1. The HttpServletRequestWrapper is an example of the Decorator pattern.

  2. The HttpServletRequestWrapper can be used to extend the functionality of a servlet request.

  3. A subclass of HttpServletRequestWrapper CANNOT modify the behavior of the getReader method.

  4. An HttpServletRequestWrapper may be used only by a class implementing the javax.servlet.Filter interface.

  5. An HttpServletRequestWrapper CANNOT be used on the request passed to the RequestDispatcher.include

  6. An HttpServletRequestWrapper may modify the header of a request within an object implementing the


Correct Option: A,B,F

What does getSession(false) will do?

  1. Create new session if the session does not already exist

  2. Returns null if session does not already exist

  3. Returns false

  4. Destroy the session


Correct Option: B

What is the difference between an object and an instance?

  1. No difference, both are the same

  2. An Object maynot have a class definition, but an instance must have a class definition

  3. An Object must have a class definition, but an instance may not have a class definition

  4. Object and Instance should have different class definitions. It can not be the same.


Correct Option: B
  1. Interfaces of the same package and other packages

  2. Classes of the same package

  3. Classes of the same package and other packages

  4. Interfaces of the same package


Correct Option: B,D