I got "You answered correct", but I think my answer is wrong
public enum Seasons { SUMMER, WINTER } // my answer
class TestClass{
public TestClass(){
}
}
I think I could use protected, public or private just if the enum were inside of class TestClass{...}, right ?
About Question enthuware.ocpjp.v7.2.1462 :
Moderators: Site Manager, fjwalraven
-
- Posts: 47
- Joined: Mon Apr 08, 2013 7:55 pm
- Contact:
-
- Site Admin
- Posts: 10389
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1462 :
No, public is valid in this case because the question says the file name is Seasons.java
-
- Posts: 30
- Joined: Sat May 02, 2015 4:48 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1462 :
One of:
enum Seasons {}
enum Seasons {WINTER}
enum Seasons {SUMMER}
They are not taken as correct answers but wouldn't they satisfy the specs in the question also?
enum Seasons {}
enum Seasons {WINTER}
enum Seasons {SUMMER}
They are not taken as correct answers but wouldn't they satisfy the specs in the question also?
-
- Site Admin
- Posts: 10389
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1462 :
Yes, you are right. Technically, they are valid. I have updated the question statement accordingly.
thank you for your feedback!
Paul.
thank you for your feedback!
Paul.
Who is online
Users browsing this forum: Bing [Bot] and 1 guest