SCJP 1.6版考題 059

出自 陳富國維基館
於 2013年3月30日 (六) 07:04 由 Ikk (對話 | 貢獻) 所做的修訂 (新頁面: Given the following directory structure: bigProject |--source | |--Utils.java | |--classes | And the following command line invocation: javac –d classes source/Utils.java ...)
(差異) ←上個修訂 | 最新修訂 (差異) | 下個修訂→ (差異)
前往: 導覽搜尋
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.

解答


Ans: C

解說: -d classes是指定產生的類別要放的目錄名稱為classes