Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, you do. :-) Alternative Java 8 solution:

int total = IntStream.rangeClosed(1, 10).map(x -> x*x).sum();



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: