Java Basic


  1. Which of the following methods returns proxy object?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    load() method returns proxy object. load() method should be used if it is sure that instance exists.


  1. Which of the following methods hits database always?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    get() method hits database always. Also, get() method does not return proxy object.



  1. Which of the following method is used inside session only?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    update() method can only be used inside session. update() should be used if session does not contain persistent object.


  1. Which of the following is correct error when loading JAR file with duplicate name?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    java.lang.ClassFormatError: Duplicate Name error is thrown when .class file in the JAR contains a class whose class name is different from the expected name.



  1. Which file separator should be used by MANIFEST file?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    MANIFEST file uses classes using / file separator.