The given code will not compile, because the enum Grade is not defined in Student!List<Student> ls = Arrays.asList(new Student("S1", Student.Grade.A), new Student("S2", Student.Grade.A), new Student("S3", Student.Grade.C));
About Question enthuware.ocpjp.v8.2.1804 :
Moderators: Site Manager, fjwalraven
-
- Posts: 32
- Joined: Tue Oct 06, 2015 9:06 am
- Contact:
About Question enthuware.ocpjp.v8.2.1804 :
-
- Site Admin
- Posts: 10389
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1804 :
Yes, the enum was supposed to be inside Student. Fixed.
thank you for your feedback!
Paul.
thank you for your feedback!
Paul.
Who is online
Users browsing this forum: No registered users and 10 guests