- 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 - 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 3 - Which of the following property defines the home directory of Ant installation?
Answer : B
Explanation
ant.home - The home directory of 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 ? meta character in patternset data type?
A - ? - Matches one character only.
B - ? - Matches zero or many characters.
Answer : A
Explanation
? - Matches one character only.
Q 6 - Which of the following is correct about path data type?
A - The path data type is commonly used to represent a class-path.
B - Entries in the path are separated using semicolons or colons.
Answer : D
Explanation
The path data type is commonly used to represent a class-path. Entries in the path are separated using semicolons or colons. However, these characters are replaced at the run-time by the executing system's path separator character.
Q 7 - Which of the following is correct about javadoc task?
A - javadoc task can be used to create java documentation.
B - Source can be specified using sourcepath, sourcepathref or sourcefiles attributes.
Answer : C
Explanation
javadoc task can be used to create java documentation. Source can be specified using sourcepath, sourcepathref or sourcefiles attributes.
Q 8 - Which of the following task is used to create a war file?
Answer : A
Explanation
war task can be used to create a war file.
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.
Q 10 - Which of the following is correct about deploywar target?
A - The deploywar target builds the war file.
B - The deploywar target copies the war file to the deploy directory of the application server.
Answer : C
Explanation
The deploywar target builds the war file and then copies the war file to the deploy directory of the application server.
To Continue Learning Please Login
Login with Google