Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817
Moderator: admin
b0risen
Post
by b0risen » Fri Jan 18, 2013 6:15 am
Given the following class, which of these are valid ways of referring to the class from outside of the package com.enthu?
Code: Select all
package com.enthu;
public class Base{
// ....
// lot of code...
}
I think that second answer may be also true or description of this answer is invalid:
By importing the package com.* and referring to the class as enthu.Base
package 'com' does not contain Base.
admin
Site Admin
Posts: 10388 Joined: Fri Sep 10, 2010 9:26 pm
Contact:
Post
by admin » Fri Jan 18, 2013 1:01 pm
Second option is not correct because if you do import com.*; that means you are importing the classes in package com. But class Base is not in package com. It is in package com.enthu.
HTH,
Paul
b0risen
Post
by b0risen » Mon Jan 21, 2013 2:27 am
Ok, thanks for reply.
flex567
Posts: 202 Joined: Mon Apr 02, 2018 8:40 am
Contact:
Post
by flex567 » Sun Nov 04, 2018 6:03 am
Second option is not correct because if you do import com;
But there is no
in the answers but only
admin
Site Admin
Posts: 10388 Joined: Fri Sep 10, 2010 9:26 pm
Contact:
Post
by admin » Sun Nov 04, 2018 6:11 am
Yes, I should have written com.* in my post above. Updated.
Users browsing this forum: No registered users and 6 guests