About Question enthuware.ocpjp.v7.2.1616 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
SepticInsect
Posts: 20
Joined: Tue Nov 04, 2014 1:13 am
Contact:

About Question enthuware.ocpjp.v7.2.1616 :

Post by SepticInsect »

Why isn't alternativ 2 correct?
"package 'com' does not contain Base." But the class is refered to as enthu.Base.

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1616 :

Post by admin »

import statement imports only classes. It does not import sub packages.
So by importing com.*, you will be importing classes that are there directly in the package com. But the class that you need is in package com.enthu.

Alina_Lapina
Posts: 15
Joined: Tue Jan 13, 2015 12:10 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1616 :

Post by Alina_Lapina »

Is it correct to import only one class?

Code: Select all

import com.enthu.Base; 

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1616 :

Post by admin »

What happened when you tried it out?

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest