MCQOPTIONS
Saved Bookmarks
This section includes 11 Mcqs, each offering curated multiple-choice questions to sharpen your Advanced Java knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which is the Parent class of annotation class? |
| A. | Class |
| B. | Object |
| C. | Main |
| D. | Super |
| Answer» C. Main | |
| 2. |
Which of the following annotation is used to avoid execution of Junits? |
| A. | @NoTest |
| B. | @explicit |
| C. | @avoid |
| D. | @ignore |
| Answer» E. | |
| 3. |
Using which annotation non visible or private method can be tested? |
| A. | @VisibleForTesting |
| B. | @NonVisibleForTesting |
| C. | @Visible |
| D. | @NonVisible |
| Answer» B. @NonVisibleForTesting | |
| 4. |
Which one of the following is not an annotation used by Junit with Junit4? |
| A. | @Test |
| B. | @BeforeClass |
| C. | @AfterClass |
| D. | @Ignored |
| Answer» E. | |
| 5. |
Which one of the following annotations is not used in Hibernate? |
| A. | @Entity |
| B. | @Column |
| C. | @Basic |
| D. | @Query |
| Answer» E. | |
| 6. |
Annotation type definition looks similar to which of the following? |
| A. | Method |
| B. | Class |
| C. | Interface |
| D. | Field |
| Answer» D. Field | |
| 7. |
Which version of Java introduced annotation? |
| A. | Java 5 |
| B. | Java 6 |
| C. | Java 7 |
| D. | Java 8 |
| Answer» B. Java 6 | |
| 8. |
WHICH_IS_THE_PARENT_CLASS_OF_ANNOTATION_CLASS??$ |
| A. | Class |
| B. | Object |
| C. | Main |
| D. | Super |
| Answer» C. Main | |
| 9. |
Which one of the following is not ID generating strategy using @GeneratedValue annotation? |
| A. | Auto |
| B. | Manual |
| C. | Identity |
| D. | Sequence |
| Answer» C. Identity | |
| 10. |
Annotations which are applied to other annotations are called meta annotations. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 11. |
Which of the following is not pre defined annotation in Java? |
| A. | @Deprecated |
| B. | @Overriden |
| C. | @SafeVarags |
| D. | @FunctionInterface |
| Answer» C. @SafeVarags | |