Which command-line compiler invocation will create a foo directory within the classes directory, and then place the compiled Clock.class within that directory?

Given:
Directory structure:
projects
|__src
| |__foo
|
|__classes
A file Clock.java in the /projects/src/foo directory
The working directory /projects/src
The class Clock in package foo
Which command-line compiler invocation will create a foo directory within the classes directory,
and then place the compiled Clock.class within that directory?

Given:
Directory structure:
projects
|__src
| |__foo
|
|__classes
A file Clock.java in the /projects/src/foo directory
The working directory /projects/src
The class Clock in package foo
Which command-line compiler invocation will create a foo directory within the classes directory,
and then place the compiled Clock.class within that directory?

A.
javac -directory ../classes/foo foo/Clock.java

B.
javac -d ../classes/foo/Clock.java

C.
javac -d ../classes/foo foo.Clock.java

D.
javac -D foo/Clock.java

E.
javac -d ../classes foo/Clock.java



Leave a Reply 0

Your email address will not be published. Required fields are marked *