• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ambigous questions

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

there is an ExamLab question on the diagnostic exam regarding javac look like this:

javac -d rabbit board/A.java

One of the correct answers is "The output will be stored in the rabbit directoy".
But I choose "The output will be stored in the rabbit board directoy"

After some tests on the console I figured out that A.java has no package. If the full qualified class name were like board/A.java then my answer would be correct. I assumed that board is the package name but it was not. A.java has no package at all. Thus the class file is stored in rabbit directory.

How to deal with such missunderstandings? The question doesnt provide information whether A.java has a package 'board' or not. So I feel that my answer might be correct as well.
 
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The -d switch specifies the output directory. So here it says that the output directory will be rabbit. If A was in the package board, a sub-directory would be created inside the rabbit folder, but that doesn't change the fact that rabbit is the output directory of the javac command.
 
reply
    Bookmark Topic Watch Topic
  • New Topic