Java Basic


  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.



  1. Which of the following is not true about Java beans?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    java.io.Serializable is not a class. Instead it is an interface. Hence it cannot be extended.


  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.