Java Basic


  1. Which of the following is not an Enterprise Beans type?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Stateful, Stateless and Singleton are session beans.


  1. What does Liskov substitution principle specify?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Liskov substitution principle states that Objects in a program should be replaceable with instances of their sub types without altering the correctness of that program.



  1. What should the return type of method where there is no return value?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Returning Empty collection is a good practice. It eliminates chances of unhandled null pointer exceptions.


  1. Which of the following is not an advantage of Hibernate Criteria API?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    addOrder() can be used for ordering the results.



  1. In which file database table configuration is stored?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Database table configuration is stored in .hbm file.