1 - When we say "import org.*;" does this only import the files in the org directory and not any subdirectories?
OCPJP 6, OCMJD (2/3)
Govindarajan Gowrisankaran
Greenhorn
Joined: Jan 16, 2012
Posts: 4
posted
1
Yes when you import org.* only files in the org directory will be imported in to your source file and no files will be imported from the subdirectory of org.
With regard to this question, how are you supposed to know/deduce what directory MyClass is in?
Govindarajan Gowrisankaran
Greenhorn
Joined: Jan 16, 2012
Posts: 4
posted
0
There is no necessity to know where your MyClass has been placed. You are just creating instances of Pet, Dog and Robot classes which are in different directories and inorder to create objects you should use import statements to let the compiler know where your class files has been placed.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.