About Question enthuware.ocpjp.v7.2.1227 :

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

Moderator: admin

Post Reply
ETS User

About Question enthuware.ocpjp.v7.2.1227 :

Post by ETS User »

in the Explanation:

Rule 1 : The type of the switch expression and the type of the case labels must be compatible. In this case, the switch expression is of type String, so all the case labels must be of type String. Therefore, iv, i, obj, and 100 are invalid.

obj and srty But both are declared similarly


kinds regards

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

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

Post by admin »

Hello,
Both are declared differently:

Code: Select all

final String str = "100";
final Object obj = "100";
This was fixed recently so please update your question bank file.

HTH,
Paul.

magdute70
Posts: 4
Joined: Fri Mar 20, 2015 4:34 pm
Contact:

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

Post by magdute70 »

:mrgreen: I'm sure this program will not run forever - system will crash or device will run out of electricity sometime

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests