Java OCA OCP Practice Question 3267

Question

Given the following directory structure:

/proj
  |--- bin
        |--- top
              |--- sub

Assume that the classpath has the value:

top:top/sub

Which of the following statements are true?

Select the three correct answers.

(a)If the current directory is /proj/bin, the following directories are searched: top and sub.
(b)If  the  current  directory  is  /proj/bin,  the  following  directories  are  searched: bin, top and sub.
(c)If the current directory is /proj, the following directories are searched: bin, top and sub.
(d)If the current directory is /proj, no directories are searched.
(e)If the current directory is /proj/top, no directories are searched.


(a), (d), (e)

Note

Note that the entries in the classpath are relative paths.

When the current directory is /proj/bin, both entries in the classpath can be found under /proj/bin.

The directory bin itself is not searched, as there is no valid path /proj/bin/bin.

When the current directory is /proj, both entries in the classpath cannot be found relative to /proj, i.e., the paths /proj/top and /proj/top/sub are not valid paths.




PreviousNext

Related