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.

Questions and Answers

Ant Mock Test

Q 1 - Which of the following property defines the invoked target of current project?

A - ant.project.target

B - ant.project.invoked-targets

C - ant.project.targets

D - None of the above.

Answer : B

Explanation

ant.project.invoked-targets - Comma separated list of the targets that were invoked in the current project.

Q 2 - Which of the following property defines the base directory of current project?

A - ant.project.target

B - ant.project.basedir

C - basedir

D - None of the above.

Answer : C

Explanation

basedir - The basedir of the build, as specified in the basedir attribute of the project element.

Q 3 - Which of the following property defines the name of current project?

A - ant.project.name

B - ant.name

C - name

D - None of the above.

Answer : A

Explanation

ant.project.name - The name of the project, as specified in the name atrribute of the project element.

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.

Answer : C

Explanation

Both of the above options are correct.

Answer : C

Explanation

A pattern set is a pattern that allows to filter files or folders easily based on certain patterns.

Answer : A

Explanation

? - Matches one character only.

Answer : B

Explanation

* - Matches zero or many characters.

Answer : C

Explanation

** - Matches zero or many directories recursively.

Answer : A

Explanation

The patternset can be reused with a fileset.

Answer : C

Explanation

Both of the above options are correct.

Answer : C

Explanation

filelist data type can be applied for existing or non-existing files.

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.

Answer : D

Explanation

All of the above options are correct.

Answer : D

Explanation

All of the above options are correct.

Answer : C

Explanation

javadoc task can be used to create java documentation. Source can be specified using sourcepath, sourcepathref or sourcefiles attributes.

Answer Sheet

Question Number Answer Key
1 B
2 C
3 A
4 D
5 C
6 C
7 A
8 B
9 C
10 A
11 C
12 C
13 D
14 D
15 D
16 C
ant_questions_answers.htm
Advertisements