November 2nd, 2011, 09:17 PM
You don't really need to determine if the numbers are prime.
I would suggest, however, starting from 2, which is the first prime number.
Also remember that a divisor might be used multiple...
October 30th, 2011, 09:46 AM
Your code is remarkably close to being a correct solution.
This code prints all the matching words:
if (i1 == 26) {
System.out.print(" Maximum string found " + str3 );
}
October 30th, 2011, 09:24 AM
That's a pretty good attempt so far.
You could accumulate the letters guessed so far in a String variable. Then you would want to check to see if the character 'phrase.charAt(a - 1)' is in the...
October 29th, 2011, 12:01 PM
You have a confusion of fields in the class -- too many, and you're not clear about how each should be used.
I think you want to call your 'recordPurchase' method, not the 'purchase' method. ...
September 2nd, 2011, 07:45 PM
The JavaDoc for the method explains what the hash code MUST be:
http://download.oracle.com/javase/6/docs/api/java/lang/Object.html#hashCode()
Briefly, if two instances are equal, then their hash...
August 25th, 2011, 09:14 AM
P.S. "sinus curve"?
This is the first time I've heard anyone use that word related to sin functions.
This is a sinus: http://www.krystalplonski.com/wp-content/uploads/2011/06/nasal-cavity.jpg
...
August 24th, 2011, 04:39 PM
It seems to "work" in some sense.
Hard to tell without having a more clear idea of what you are trying to accomplish.
But this expression doesn't look exactly right to me: scale * (width +...
August 24th, 2011, 04:33 PM
Looks like it "works" in some sense: It compiles. It runs. It produces a result.
Looks like about half the time it populates the very first array element with the value one. And that's about...
August 24th, 2011, 09:46 AM
The quickest easiest way to fix the last remaining compile problem is to add "return null;" as the last line in the method. This will fix the "This method must return a result of type Product"...
August 24th, 2011, 09:43 AM
You forgot the 't' in "ex.printStackTrace();".