Home » JAVA Programming » Java Basic » Question
  1. Which of the following is correct error when loading JAR file with duplicate name?
    1. java.lang.ClassNotFound
    2. java.io.NullPointerException
    3. java.lang.DuplicateClassError
    4. java.lang.ClassFormatError
    5. None of these
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.



Your comments will be displayed only after manual approval.