Java/Spring Technical Questions

16 Questions | Attempts: 960
Share

SettingsSettingsSettings
Java Quizzes & Trivia

This is your description.


Questions and Answers
  • 1. 

    Characteristics of an array include:

    • A.

      Fast random access

    • B.

      Fast random insertion and deletion

    • C.

      Fixed Size

    • D.

      (A) and (B)

    Correct Answer
    C. Fixed Size
  • 2. 

    Java approximates multiple inheritance through the existence of ...

    • A.

      Abstract Class

    • B.

      Interface

    • C.

      Static

    • D.

      Encapsulation

    Correct Answer
    B. Interface
  • 3. 

    A method must catch or declare to be thrown which of the following?

    • A.

      Error

    • B.

      Exception

    • C.

      Runtime Exception

    • D.

      None of the above

    Correct Answer
    B. Exception
  • 4. 

    The container provides which of the below services

    • A.

      Transaction management

    • B.

      Security

    • C.

      Database connection pooling

    • D.

      Resource management

    • E.

      All of the above

    Correct Answer
    E. All of the above
  • 5. 

    Front controller in Spring MVC is

    • A.

      Dispatcher

    • B.

      DispatcherServlet

    • C.

      Org.springframework.web.servlet.DispatcherServlet

    • D.

      FrontControllerServlet

    Correct Answer
    C. Org.springframework.web.servlet.DispatcherServlet
  • 6. 

    Type of Injection mechanism that Spring supports

    • A.

      Setter

    • B.

      Method

    • C.

      Constructor

    • D.

      A & C

    Correct Answer
    D. A & C
  • 7. 

    Choose the bean scopes in spring framework

    • A.

      Singleton

    • B.

      Session

    • C.

      Container

    • D.

      A and B

    Correct Answer
    D. A and B
  • 8. 

    What is the output of the following program? class Array {   public static void main(String[] args) {     int length = 100;     int[] d = new int[length];       for (int index = 0; index < length; index++)     System.out.println(d[index]);   } }

    • A.

      The code will not compile because the int[] array is not declared correctly.

    • B.

      The code will compile but will throw an IndexArrayOutOfBoundsException when it runs and and nothing will appear in the standard output

    • C.

      The code will display the numbers 0 through 99 in the standard output, and then throw an IndexOutOfBoundsException

    • D.

      This code will work fine and display 100 zeroes in the standard output

    Correct Answer
    D. This code will work fine and display 100 zeroes in the standard output
  • 9. 

    Choose the class that implements List interface

    • A.

      Vector

    • B.

      HashTable

    • C.

      HashList

    • D.

      HashMap

    Correct Answer
    A. Vector
  • 10. 

    Which collection supports Random Access (not too many add or remove)

    • A.

      ArrayList

    • B.

      LinkedList

    • C.

      Vector

    • D.

      None of the above

    Correct Answer
    A. ArrayList
  • 11. 

    Which method sends the request to the browser

    • A.

      SendRedirect()

    • B.

      Forward()

    • C.

      DoGet()

    • D.

      DoPost()

    Correct Answer
    A. SendRedirect()
  • 12. 

    Using Servlet Filter one can modify the request and response

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 13. 

    Action taken by an aspect at a particular join point is Advice

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 14. 

    How would you make a copy of an entire Java object with its state?

    Correct Answer
    Implement Cloneable Interface
  • 15. 

    Iterator is a class

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
  • 16. 

    Example of Last-in-first-out rule (LIFO) is 

    Correct Answer
    Stack

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Aug 21, 2013
    Quiz Edited by
    ProProfs Editorial Team
  • Aug 19, 2013
    Quiz Created by
    Asiva
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.