Forum: Java Dec 29th, 2008 |
| Replies: 8 Views: 659 You don't actually have to go to all that trouble, though...
int val = Integer.parseInt(str, 2);
float f = Float.intBitsToFloat(val); |
Forum: Java Dec 15th, 2008 |
| Replies: 7 Views: 585 Oh the positioning -- I think that's just because you're not actually calling the initialize() method, isn't it? |
Forum: Java Dec 14th, 2008 |
| Replies: 7 Views: 585 There's nothing wrong with it per se -- it's a very powerful component -- but it's not designed for what you're trying to do. It is designed for cases where you want to run code in some arbitrary... |
Forum: Java Dec 14th, 2008 |
| Replies: 5 Views: 596 By the way, you should be very wary of just making your program call Runtime.exec() and "sitting back and relaxing": if the other process logs anything out (to either the standard output or error... |
Forum: Java Dec 14th, 2008 |
| Replies: 7 Views: 585 Difficult to wade through this code, but general recommendations to start finding the problems:
- if you're subclassing things like Ellipse2D, don't spuriously have extra variables like 'x', 'y'... |
Forum: Java Dec 14th, 2008 |
| Replies: 3 Views: 443 I think the way you're storing things is a little bit odd, and that's tying you in knots. You've declared variables that duplicate one another: on the one hand, you've got the separate 'day',... |
Forum: Java Dec 12th, 2008 |
| Replies: 14 Views: 1,417 String.split() really can help you out, I think. If I understand rightly, the thing you're dissatisfied with is that the suggestion strips off the terminating punctuation from the strings. The... |
Forum: Java Dec 11th, 2008 |
| Replies: 5 Views: 455 OK, so in this specific example, absolutely any sequence of bytes can be a valid string. So when you read a string from the file-- I assume you're thinking of one "string" per line, so you'd... |
Forum: Java Dec 11th, 2008 |
| Replies: 5 Views: 455 An important thing to understand is that there are two types of exceptions:
checked exceptions, which are thrown when your code (or some code in the Java libraries) explicitly throws them; in... |