Ant Online Quiz


Advertisements

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.

Questions and Answers

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 is a predefined property in ANT?

A - ant.file

B - ant.version

C - basedir

D - All of the above.

Answer : D

Explanation

All of the above are predefined properties in ANT.

Q 4 - 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.

Answer : C

Explanation

Both of the above options are correct.

Answer : D

Explanation

All of the above options are correct.

Answer : D

Explanation

All of the above options are correct.

Q 8 - Which of the following attribute refers to base directory for the output JAR file?

A - base

B - basedir

C - base-dir

D - None of the above.

Answer : B

Explanation

basedir - The base directory for the output JAR file. By default, this is set to the base directory of the project.

Answer : A

Explanation

Compress - Advises Ant to compress the file as it creates the JAR file.

Answer : C

Explanation

Dir - Where to invoke the VM from. This is ignored when fork is disabled.

ant_questions_answers.htm
Advertisements