- 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.
Answer Sheet
Question Number | Answer Key |
---|---|
1 | D |
2 | C |
3 | D |
4 | D |
5 | D |
6 | A |
7 | C |
8 | C |
9 | C |