- 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 Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Ant. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
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 - 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 3 - Which of the following property defines the version of Ant installation?
Answer : A
Explanation
ant.version - The version of the Apache Ant installation.
Q 4 - 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.
Q 5 - Which of the following is correct about patternset data type?
A - A pattern set is a pattern that allows to filter files based on certain patterns.
B - A pattern set is a pattern that allows to filter folders based on certain patterns.
Answer : C
Explanation
A pattern set is a pattern that allows to filter files or folders easily based on certain patterns.
Q 6 - Which of the following is correct about filelist data type?
A - filelist contains explicitly named lists of files.
Answer : C
Explanation
Both of the above options are correct.
Q 7 - Which of the following is correct about javadoc task?
A - sourcepath is used to point to the folder of the source files (e.g. src folder).
C - sourcepath is used when you want to specify the individual files as a comma separated list.
Answer : A
Explanation
sourcepath is used to point to the folder of the source files (e.g. src folder).
Q 8 - Which of the following is correct about javadoc task?
A - destdir is used to specify the destination folder.
C - destdir is used when you want to specify the individual files as a comma separated list.
Answer : A
Explanation
destdir is used to specify the destination folder.
Q 9 - Which of the following is correct about excludes attribute of jar task?
A - Advises Ant to not include comma separated list of files in the package.
B - Advises Ant to not include pattern specified list of files in the package.
Answer : A
Explanation
Excludes - Advises Ant to not include comma separated list of files in the package.