[Attention] Enum is thoroughly tested in real exam

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

Moderator: admin

Post Reply
icepeanuts
Posts: 53
Joined: Thu Nov 22, 2012 12:01 am
Contact:

[Attention] Enum is thoroughly tested in real exam

Post by icepeanuts »

I just did a real 1Z0-804 exam today and did not think I should have paid so much attention to this part.

1) It is a compile-time error if a constructor declaration of an enum type is public or protected. Instead, the constructor should have a private modifier or just ignore it. If an enum type has no constructor declarations, then a private constructor that takes no parameters (to match the implicit empty argument list) is automatically provided.

2) Enums are implicitly declared public, static, and final, which means you cannot extend them. But enums can implement interfaces.

3) Enumeration constants cannot be cloned. An attempt to do so will result in a CloneNotSupportedException.

4) Go through Enum's methods such as ordinal(), which returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).

5) Enum can have nested classes.

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

Re: [Attention] Enum is thoroughly tested in real exam

Post by admin »

Hi,
Thank you for alerting users about this. Most of these aspects are thoroughly covered in the question bank. In fact, these questions are categorized in a separate objective altogether.

Here are the question ids that cover enums:
2.1463
2.1418
2.1437
2.146
2.1462
2.1473
2.1461
2.1457
2.1464
2.1388
2.1508

We will check all the questions and make sure everything is covered.
HTH,
Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests