Skip to main content
bowmore's user avatar
bowmore's user avatar
bowmore's user avatar
bowmore
  • Member for 11 years, 10 months
  • Last seen this week
answered
Loading…
awarded
comment
Producer consumer water cooler example
2) yes, the producer waits until the list is empty. But you need to wait in a loop that chacks the condition you're waiting for to guard against spurious wake ups (= being awoken when there was no notification.) see tech-read.com/2010/01/28/spurious-wakeup-in-java for a brief explanation or consult Effective Java or Java Concurrency in Practice if you have either available.
answered
Loading…
revised
Age in years at a specific date
added 717 characters in body
Loading…
answered
Loading…
Loading…
comment
Game Of Life 3 in Java
@ChristianHujer Note that I'm saying disposing is fine. Just that after closing the last frame the application does not end. There's no code in place to actually exit.
awarded
answered
Loading…
Loading…
awarded
revised
Class for Map of Maps
added 1 character in body
Loading…
awarded
comment
Project Euler #2 (Fibonacci Sequence)
@ChristianHujer actually my output varied from 601 to 1501 nanos on a Intel Core i7-3770 CPU @ 3.40Ghz 3.40GHz on Oracle's 1.8.0_25 JVM. The b<<2 looks a little faster than b+b+b+b+a on average but not much. Both are around 1201. 4*b+a is around 3603 as I said before the edit.
revised
Project Euler #2 (Fibonacci Sequence)
added 163 characters in body
Loading…
answered
Loading…
comment
Extract data from database and write them to file
As it is, the code you have can not work. There are missing semicolons, use of a non existing logger field and calling the constructor of an abstract class...
Loading…
comment
"Rational" Wrapper class with support for Rational Number Approximation
Suggestion : have this class extend java.lang.Number
1
3 4
5
6 7
17