Dear candidates you will find MCQ questions of JAVA here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question
JVM (Java Virtual Machine) is a crucial part of the Java Runtime Environment (JRE). It is responsible for executing Java bytecode, making Java platform-independent by allowing it to run on any operating system that has a JVM.
Key Functions of JVM:
Final Answer:
β (C) Java Virtual Machine
Apache Ant is a Java-based build tool that automates software build processes. However, it does not provide lifecycle management like Maven or Gradle. Instead, it follows a procedural approach where tasks are defined in a specific sequence.
Why the other options are true?
(A) It doesnβt have formal conventions β β True
(B) It is procedural β β True
(C) It is a toolbox β β True
Final Answer:
β (D) It provides lifecycle management (False statement)
Yes, JUnit tests can be run as part of a Jenkins job. Jenkins supports JUnit test execution and reporting through various plugins like:
Example: Running JUnit in Jenkins Pipeline
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'mvn clean test' // Runs JUnit tests
}
}
stage('Report') {
steps {
junit '**/target/surefire-reports/*.xml' // Publishes JUnit reports
}
}
}
}
Thus, the correct answer is: (B) True β
A Source Code Management (SCM) tool is used to track and manage changes in the source code. Among the given options:
Thus, Git is the correct answer.
Thus, MAVEN_HOME is the correct answer.