Better HN
topnewbestaskshowjobs
Log inSign up

javafoo

4 karma · joined May 30, 2014 (12y ago) · 2 submissions

Submissions

comment 12y ago · link · parent

Crawling your book, i stumble over several codes that use flags instead of "return" to exit, by example, you use two flags for searching on an ordered list.

These kind of codes are not great for beginners because they tend to think that setting the flag is equivalent to exiting which is as you know an illusion.

comment 12y ago · link · parent

It's configurable !

ForkJoinPool forkJoinPool = new ForkJoinPool(2); forkJoinPool.submit(() -> // write your parallel query here ).get();