[HD Pg 204, Sec. 8.4.4 - applying-access-modifiers-to-members-of-an-enum]

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

Moderator: admin

Post Reply
OCAJO1
Posts: 221
Joined: Mon Nov 26, 2018 2:43 pm
Contact:

[HD Pg 204, Sec. 8.4.4 - applying-access-modifiers-to-members-of-an-enum]

Post by OCAJO1 »

What happens if in an enum

private int value;
public void count(){
}

are changed to

int value;
void count(){
}

Are they treated as package private, like in a class?

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

Re: [HD Pg 204, Sec. 8.4.4 - applying-access-modifiers-to-members-of-an-enum]

Post by admin »

Correct. (Not important for OCAJP exam.)

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests