1Z0-804 · Question #135
Given two classes in separate files: Which two import statements can make the a.b.parent class compliable?
The correct answer is B. import a.b.c.Child; C. import a.b.c.*. To import a specific member into the current file, put an import statement at the beginning of thefile before any type definitions but after the package statement, if there is one.C:To import all the types contained in a particular package, use the import statement with the…
Question
Given two classes in separate files:
Which two import statements can make the a.b.parent class compliable?
Options
- Aimport a.b.c.Parent;
- Bimport a.b.c.Child;
- Cimport a.b.c.*;
- Dimport a.b.*;
- Eimport a.*;
How the community answered
(53 responses)- A11% (6)
- B81% (43)
- D2% (1)
- E6% (3)
Explanation
To import a specific member into the current file, put an import statement at the beginning of thefile before any type definitions but after the package statement, if there is one.C:To import all the types contained in a particular package, use the import statement with the asterisk (*)wildcard
Topics
Community Discussion
No community discussion yet for this question.