Forum: Java Sep 2nd, 2009 |
| Replies: 3 Views: 359 Check this page:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Random.html |
Forum: Java Jul 15th, 2009 |
| Replies: 1 Views: 267 Hello everyone!
I'm looking for a class in the Java API that can take the complete structure of a directory in itself and that can be passed on sockets, so it can be used on other machines of a... |
Forum: Java Jul 3rd, 2009 |
| Replies: 4 Views: 401 Hello everyone!
I'm developping a chat application in a client/server context and every client has a shared directory. I want the server to know the directory structure of each shared directory of... |
Forum: Java Apr 8th, 2009 |
| Replies: 9 Views: 413 Well, I don't know what's wrong: you have created a constructor for Plane that takes an AudioClip object and a Graphics object and you have passed your objects correctly. Looks ok to me.
What's... |
Forum: Java Apr 4th, 2009 |
| Replies: 3 Views: 277 if (score1 > score of the greatest)
{
name of the second = name of the first
score of the second = score of the first
name of the first = new name of the first
score of... |
Forum: Java Apr 4th, 2009 |
| Replies: 3 Views: 277 Start by looking this:
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/for.html |
Forum: Java Apr 4th, 2009 |
| Replies: 2 Views: 295 Please use tags around your code.
Are you putting all the classes in one file? Java requires that each file contains only one class. I hope that it helps.
In your method main(), why are you... |
Forum: Java Mar 25th, 2009 |
| Replies: 4 Views: 344 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: 397 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,330 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: 673 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,191 This amount of code is impossible to read!
Test your stack before attempting to use it! |
Forum: Java Feb 23rd, 2009 |
| Replies: 6 Views: 673 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: 220 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 Feb 6th, 2009 |
| Replies: 3 Views: 477 Put all the code for input into a do-while loop.
For example:
do
{
//Input...
}
while (//The variables have their correct value); |
Forum: Java Jan 29th, 2009 |
| Replies: 9 Views: 533 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: 533 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... |