InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which of the following annotation is used to avoid execution of Junits?(a) @NoTest(b) @explicit(c) @avoid(d) @ignoreI had been asked this question by my college professor while I was bunking the class.This intriguing question originated from Annotations in portion Application Lifecycle & Annotations of Java |
|
Answer» The correct OPTION is (d) @IGNORE |
|
| 2. |
Using which annotation non visible or private method can be tested?(a) @VisibleForTesting(b) @NonVisibleForTesting(c) @Visible(d) @NonVisibleThe question was posed to me in an internship interview.Question is taken from Annotations topic in section Application Lifecycle & Annotations of Java |
|
Answer» Right CHOICE is (a) @VisibleForTesting |
|
| 3. |
Which one of the following is not an annotation used by Junit with Junit4?(a) @Test(b) @BeforeClass(c) @AfterClass(d) @IgnoredI have been asked this question in an interview for job.Origin of the question is Annotations in chapter Application Lifecycle & Annotations of Java |
|
Answer» Correct ANSWER is (d) @Ignored |
|
| 4. |
Which one of the following is not ID generating strategy using @GeneratedValue annotation?(a) Auto(b) Manual(c) Identity(d) SequenceThis question was addressed to me in an interview for job.My question is from Annotations in portion Application Lifecycle & Annotations of Java |
|
Answer» The correct CHOICE is (b) Manual |
|
| 5. |
Which one of the following annotations is not used in Hibernate?(a) @Entity(b) @Column(c) @Basic(d) @QueryI had been asked this question in an interview for job.Enquiry is from Annotations in section Application Lifecycle & Annotations of Java |
|
Answer» Correct option is (d) @QUERY |
|
| 6. |
Annotations which are applied to other annotations are called meta annotations.(a) True(b) FalseThe question was posed to me in an international level competition.This key question is from Annotations topic in section Application Lifecycle & Annotations of Java |
|
Answer» Right CHOICE is (a) True |
|
| 7. |
Which of the following is not pre defined annotation in Java?(a) @Deprecated(b) @Overriden(c) @SafeVarags(d) @FunctionInterfaceI got this question at a job interview.I need to ask this question from Annotations in division Application Lifecycle & Annotations of Java |
|
Answer» The correct ANSWER is (B) @Overriden |
|
| 8. |
Annotation type definition looks similar to which of the following?(a) Method(b) Class(c) Interface(d) FieldI got this question at a job interview.I'd like to ask this question from Annotations in section Application Lifecycle & Annotations of Java |
|
Answer» CORRECT option is (C) Interface The explanation is: ANNOTATION type definition is similar to an interface definition in which the KEYWORD interface is preceded by the sign @. |
|
| 9. |
Which version of Java introduced annotation?(a) Java 5(b) Java 6(c) Java 7(d) Java 8This question was posed to me during an online interview.I need to ask this question from Annotations topic in section Application Lifecycle & Annotations of Java |
|
Answer» The correct ANSWER is (a) JAVA 5 |
|
| 10. |
Which command can be used to check maven version?(a) mvn -ver(b) maven -ver(c) maven -version(d) mvn -versionThis question was addressed to me in examination.This question is from Application Lifecycle topic in division Application Lifecycle & Annotations of Java |
|
Answer» RIGHT answer is (d) MVN -VERSION To explain I would say: mvn -version can be used to check the version of installed maven from COMMAND prompt. |
|
| 11. |
Can we run Junits as a part of Jenkins job?(a) True(b) FalseI have been asked this question in my homework.This question is from Application Lifecycle in division Application Lifecycle & Annotations of Java |
|
Answer» Correct option is (a) True |
|
| 12. |
Which of the following is not true for Ant?(a) It is a tool box(b) It provides lifecycle management(c) It is procedural(d) It doesn’t have formal conventionsThe question was asked in an online quiz.My question is based upon Application Lifecycle topic in portion Application Lifecycle & Annotations of Java |
|
Answer» RIGHT option is (b) It provides lifecycle MANAGEMENT The EXPLANATION is: Ant doesn’t provide lifecycle management. MAVEN provides lifecycle. |
|
| 13. |
Which of the below is a source code management tool?(a) Jenkins(b) Maven(c) Git(d) HudsonI had been asked this question during an interview.I'd like to ask this question from Application Lifecycle topic in portion Application Lifecycle & Annotations of Java |
|
Answer» The correct ANSWER is (c) Git |
|
| 14. |
Which environment variable is used to specify the path to maven?(a) JAVA_HOME(b) PATH(c) MAVEN_HOME(d) CLASSPATHThis question was addressed to me at a job interview.Enquiry is from Application Lifecycle in section Application Lifecycle & Annotations of Java |
|
Answer» Right ANSWER is (c) MAVEN_HOME |
|
| 15. |
Which file is used to specify the packaging cycle?(a) build.xml(b) pom.xml(c) dependency.xml(d) version.xmlI have been asked this question in exam.This intriguing question comes from Application Lifecycle in division Application Lifecycle & Annotations of Java |
|
Answer» CORRECT ANSWER is (a) build.xml Explanation: PROJECT STRUCTURE is SPECIFIED in build.xml. |
|
| 16. |
Which file is used to define dependency in maven?(a) build.xml(b) pom.xml(c) dependency.xml(d) version.xmlThe question was posed to me in my homework.The question is from Application Lifecycle topic in section Application Lifecycle & Annotations of Java |
|
Answer» The correct answer is (b) POM.xml |
|
| 17. |
Which of the following is not a maven goal?(a) clean(b) package(c) install(d) debugThis question was addressed to me during an internship interview.The above asked question is from Application Lifecycle topic in portion Application Lifecycle & Annotations of Java |
|
Answer» The correct OPTION is (d) DEBUG |
|
| 18. |
Which of below is not a dependency management tool?(a) Ant(b) Maven(c) Gradle(d) JenkinsThe question was posed to me by my school principal while I was bunking the class.Query is from Application Lifecycle in section Application Lifecycle & Annotations of Java |
|
Answer» The CORRECT choice is (d) JENKINS |
|