Browsing 7239 questions and answers with Jon Skeet
Your producer and consumer are each synchronizing, waiting and notifying their own monitor. You need to give them a shared monitor to use for synchronization etc. For example: Object monitor = new Object(); product pro = new... more 10/7/2014 7:30:54 AM
What you've got there is an instance initializer, as described by section 8.6 of the JLS. It's executed before the body of any constructor when an instance is created - just like field initializers. more 10/7/2014 7:14:28 AM
You're currently including " \r\n" within your right-aligned second argument. I suspect you don't want the space at all, and you don't want the \r\n to be part of the count of 20 characters. To left-align instead of right-aligning, use... more 10/7/2014 5:46:46 AM
Well yes, presumably fileName is "basicVertex.vs". Put that on the end of "./res/shaders" and you'll get .\res\shadersbasicVertex.vs. You need an extra slash: shaderReader = new BufferedReader(new FileReader("./res/shaders/" +... more 10/6/2014 6:39:00 PM
I'm guessing that you expected m4.E to be printed. But don't forget that overload resolution is performed at compile-time, not at execution time. Neither C nor B have a method4(E) method available, so the compiler resolves the calls to... more 10/6/2014 4:42:59 PM
The problem is that you've created an array, but that array is just full of null references to start with. You'd need something like: EntryRecord record = new EntryRecord(); record.Name = "Peter"; IntProfile.Entries[1] = record; to... more 10/6/2014 3:10:27 PM
I assume you're calling Parallel.Invoke from the UI thread. If so, that's the problem. Parallel.Invoke blocks until all the calls finish... which means you're blocking the UI thread. The tasks you're starting can't complete, because... more 10/6/2014 2:06:49 PM
Yes, it is aware that it's an invalid local time - which is why when you specifically ask it to convert that local time into UTC, it throws an exception. It's roughly equivalent to calling Math.sqrt(-1). The InZoneStrictly call you're... more 10/6/2014 12:03:17 PM
It's definitely not a bug, it's the documented behaviour: The custom format string is "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'". When this standard format specifier is used, the formatting or parsing operation always uses the invariant... more 10/6/2014 10:31:24 AM
Don't parse the result from JXDatePicker at all. It allows you to get the value directly as a java.util.Date (and time zone). Wherever possible, avoid converting to/from text. In this case, there's no need for text anywhere - you can get... more 10/6/2014 9:33:26 AM