- Apache ANT Tutorial
- ANT - Home
- ANT - Introduction
- ANT - Environment Setup
- ANT - Build Files
- ANT - Property Task
- ANT - Property Files
- ANT - Data Types
- ANT - Building Projects
- ANT - Build Documentation
- ANT - Creating JAR files
- ANT - Create WAR Files
- ANT - Packaging Applications
- ANT - Deploying Applications
- ANT - Executing Java code
- ANT - Eclipse Integration
- ANT - JUnit Integration
- ANT - Extending Ant
- Apache ANT Useful Examples
- ANT - Using Token
- ANT - Using Command Line Arguments
- ANT - Using If Else arguments
- ANT - Custom Components
- ANT - Listeners and Loggers
- Apache ANT Resources
- ANT - Quick Guide
- ANT - Useful Resources
- ANT - Discussion
Ant Mock Test
This section presents you various set of Mock Tests related to Ant. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
Ant Mock Test I
Q 1 - Which of the following is correct about Ant?
A - Ant is platform neutral and can handle platform specific properties such as file separators.
B - Ant can be used to perform platform specific tasks.
Answer : D
Explanation
All of the above options are correct.
Q 2 - What ANT stands for?
Answer : C
Explanation
ANT stands for Another Neat Tool.
Q 3 - Which of the following is correct about ANT?
A - Ant is good at automating complicated repetitive tasks.
B - Ant comes with a big list of predefined tasks.
Answer : D
Explanation
All of the above options are correct.
Q 4 - Which of the following is true?
A - Ant can be easily invoked from the command line.
B - Ant can integrate with free and commercial IDEs.
Answer : D
Explanation
All of the above options are correct.
Q 5 - Which of the following is true abount build.xml?
A - Ant's build file, called build.xml should reside in the base directory of the project.
B - It is used by ant to build and deploy the project.
C - There is no restriction on the file name or its location.
Answer : D
Explanation
All of the above options are correct.
Q 6 - Which of the following is true about target?
A - A target is a collection of tasks that you want to run as one unit.
Answer : A
Explanation
A target is a collection of tasks that you want to run as one unit.
Q 7 - Which of the following is true about target?
A - Targets can have dependencies on other targets.
Answer : C
Explanation
Targets can have dependencies on other targets. For example, a deploy target may have a dependency on the package target, the package target may have a dependency on the compile target and so forth. Dependencies are denoted using the depends attribute.
Q 8 - Which of the following is true about depends attribute?
A - depends attribute can have a comma separated list of all targets that this target depends on.
Answer : C
Explanation
depends attribute can have a comma separated list of all targets that this target depends on. It is an optional attribute.
Q 9 - Which of the following is correct about if attribute in target?
A - if attribute allows the execution of a target based on the trueness of a conditional attribute.
Answer : C
Explanation
If attribute allows the execution of a target based on the trueness of a conditional attribute. It is an optional attribute.
Q 10 - Which of the following is correct about unless attribute in target?
A - unless attribute adds the target to the dependency list of the specified Extension Point.
B - An Extension Point is similar to a target, but it does not have any tasks.
Answer : D
Explanation
Unless attribute adds the target to the dependency list of the specified Extension Point. An Extension Point is similar to a target, but it does not have any tasks. It is an optional attribute.
Q 11 - Which of the following is a predefined property in ANT?
Answer : D
Explanation
All of the above are predefined properties in ANT.
Q 12 - Which of the following property defines the version of Ant installation?
Answer : A
Explanation
ant.version - The version of the Apache Ant installation.
Q 13 - Which of the following property defines the version of Java installation, Ant is using?
Answer : B
Explanation
ant.java.version - The version of the JDK that is used by Ant.
Q 14 - Which of the following property defines the full location of the Ant jar file?
Answer : A
Explanation
ant.core.lib - The full location of the Ant jar file.
Q 15 - Which of the following property defines the home directory of Ant installation?
Answer : B
Explanation
ant.home - The home directory of Ant installation.
Q 16 - Which of the following property defines the default target of current project?
Answer : C
Explanation
ant.project.default-target - The default target of the current project.
Answer Sheet
Question Number | Answer Key |
---|---|
1 | D |
2 | C |
3 | D |
4 | D |
5 | D |
6 | A |
7 | C |
8 | C |
9 | C |
10 | D |
11 | D |
12 | A |
13 | B |
14 | A |
15 | B |
16 | C |