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

Osa 11, 3.5 esimerkissä virheitä #60

Open
tqre opened this issue Apr 2, 2018 · 0 comments
Open

Osa 11, 3.5 esimerkissä virheitä #60

tqre opened this issue Apr 2, 2018 · 0 comments

Comments

@tqre
Copy link

tqre commented Apr 2, 2018

Henkilo -luokan konstruktorissa muuttujat väärinpäin:
public Henkilo(int syntymavuosi, String nimi)
-pitäisi olla:
public Henkilo(String nimi, int syntymavuosi)

Lambda-lausekkeessa returnia ei käytetä:
Collections.sort(henkilot, (h1, h2) -> return h1.getSyntymavuosi() - h2.getSyntymavuosi());
-toimiva versio:
Collections.sort(henkilot, (h1, h2) -> h1.getSyntymavuosi() - h2.getSyntymavuosi());

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