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
About Question enthuware.ocpjp.v7.2.1227 :
Moderator: admin
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1227 :
Hello,
Both are declared differently:
This was fixed recently so please update your question bank file.
HTH,
Paul.
Both are declared differently:
Code: Select all
final String str = "100";
final Object obj = "100";
HTH,
Paul.
-
- Posts: 4
- Joined: Fri Mar 20, 2015 4:34 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1227 :

Who is online
Users browsing this forum: No registered users and 4 guests