Apache ANT Basics
- 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
Apache ANT Advanced
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 Useful Resources
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 Java installation, Ant is using?
Answer : B
Explanation
ant.java.version - The version of the JDK that is used by Ant.
Q 4 - Which of the following is correct about fileset data type?
A - The fileset data types represents a collection of files.
B - It is used as a filter to include files that match a particular pattern.
C - It is used as a filter to exclude files that match a particular pattern.
Answer : D
Explanation
The fileset data types represents a collection of files. It is used as a filter to include or exclude files that match a particular pattern.
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 : C
Explanation
** - Matches zero or many directories recursively.
Q 6 - Which of the following is correct about filelist data type?
A - filelist data type can be applied for existing files.
B - filelist data type can be applied for non-existing files.
Answer : C
Explanation
filelist data type can be applied for existing or non-existing files.
Q 7 - Which of the following is correct about default project structure?
A - The JSPs are stored in the jsp folder.
B - The third party jar files are stored in the lib folder.
C - The java class files are stored in the WEB-INF\classes folder.
Answer : D
Explanation
All of the above options are correct.
Q 8 - Which of the following task is used to create a jar file?
Answer : A
Explanation
jar task can be used to create a jar file.
Q 9 - Which of the following is correct about excludesfile 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 pattern specified list of files in the package.