Given the following directory structure:
bigProject
¦--source
¦ ¦--Utils.java
¦
¦--classes
¦
And the following command line invocation:
javac –d classes source/Utils.java
Assume the current directory is bigProject, what it the result?
A. If the compile is successful, Utils.class is added to the source directory.
B. The compiler returns an invalid flag error.
C. If the compile is successful, Utils.class is added to the classes directory.
D. If the compile is successful, Utils.class is added to the bigProject directory.
答案:C
參考:7-2 編譯Java 專案套件
-------------------------------------------------------
javac –d classes source/Utils.java , -d 會把編譯成功的java檔放入 -d 後面所指定的目錄
沒有留言:
張貼留言