Forum: Java Sep 2nd, 2009 |
| Replies: 3 Views: 365 Check this page:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Random.html |
Forum: Java Mar 25th, 2009 |
| Replies: 4 Views: 351 You can still use a refactoring tip: Introduce Explaining Variable.
Declare, for each equals(), a bool that contains the result of this operation and use them in the if statement instead of the... |
Forum: Java Mar 25th, 2009 |
| Replies: 9 Views: 407 First, you should access the static methods (add, minus) in a static way, like Money.add( ... ) and Money.minus ( ... ).
Accessing a static method on an object (ok) is not supposed to change the... |
Forum: Java Mar 3rd, 2009 |
| Replies: 10 Views: 2,522 Use System.out.println("Your message") to print debugging messages about your input string and the value of every variable. First, ensure that the string is received from the scanner. After, look in... |
Forum: Java Feb 23rd, 2009 |
| Replies: 6 Views: 708 On which OS are you using?. It may not do a difference, but the "slash-backslash" complexity can cause this.
Otherwise, look at the renameTo method. Look for special permissions or existence of... |
Forum: Java Feb 23rd, 2009 |
| Replies: 5 Views: 1,305 This amount of code is impossible to read!
Test your stack before attempting to use it! |
Forum: Java Feb 23rd, 2009 |
| Replies: 6 Views: 708 If the file you want to copy is already used by an another process (if this is it), you cannot have access to it (except if you have special permissions).
This is very useful program for spotting... |
Forum: Java Feb 23rd, 2009 |
| Replies: 3 Views: 224 This is what I suggest to you:
1) You will take your FileToArray() function and you will test it with all the possible limit cases (even if they are stupid). If there's no problem, then you will... |
Forum: Java Jan 29th, 2009 |
| Replies: 9 Views: 537 You need to put "new Venn()" in your constructor or after the declaration of forstevenn, and make sure that the String object to print is initialized (via new). |
Forum: Java Jan 29th, 2009 |
| Replies: 9 Views: 537 Two possibilities here:
-the String of Venn is null.
-p is null and that is why the message is not printed.
Use System.out.println("Debug messages") to trace the execution of the code. This will... |