Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Waitress Class java.util.Iterator Refactor page 336 #33

Open
jsudol85 opened this issue May 6, 2022 · 0 comments
Open

Waitress Class java.util.Iterator Refactor page 336 #33

jsudol85 opened this issue May 6, 2022 · 0 comments

Comments

@jsudol85
Copy link

jsudol85 commented May 6, 2022

The book mentions on p. 336 that the "private void printMenu (Iterator iterator)" method does not need to be changed. I'm running Eclipse IDE Version: 2022-03 (4.23.0) and the interpreter will complain with a warning that " Iterator is a raw type. References to generic type Iterator should be parameterized", as well as throw an error on the "MenuItem menuItem = iterator.next();" line, stating " Type mismatch: cannot convert from Object to MenuItem".

Changing "private void printMenu (Iterator iterator)" to "private void printMenu (Iterator iterator)" remove both the warning an error and solves the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant