About Question enthuware.ocajp.i.v7.2.1275 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
mnellutla
Posts: 2
Joined: Wed Nov 19, 2014 10:08 pm
Contact:

About Question enthuware.ocajp.i.v7.2.1275 :

Post by mnellutla »

How can you declare 'i' so that it is not visible outside the package test.

package test;
public class Test{
XXX int i;
/* irrelevant code */
}

1)private
2)public
3)protected
4)No access modifier
5) friend

why is 4 not a valid answer? No access modifier is = default = protected right?

private and public i can understand? Please clarify.

mnellutla
Posts: 2
Joined: Wed Nov 19, 2014 10:08 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1275 :

Post by mnellutla »

Sorry miss read the answer... i am good. Late night reading.....

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 11 guests