Question 62 Quiz C S&B Ebook
The correct answers are B,E and F.
So what I would like to know is:
1 - When we say "import org.*;" does this only import the files in the org directory and not any subdirectories?
Given the directory structure:
org
|--Robot.class
|
|--ex
......|--Pet.class
......|
......|--why
...........|--Dog.class
And the following source file:
class MyClass{
Robot r;
Pet p;
Dog d;
}
Which statements must be added for the source code to compile:
A- package org;
B- import org.*;
C- package org.*;
D- package org.ex;
E- import org.ex.*;
F- package org.ex.why;
G- package org.ex.why.Dog;
The correct answers are B,E and F.
So what I would like to know is:
1 - When we say "import org.*;" does this only import the files in the org directory and not any subdirectories?