Computer Science Canada palindrom |
Author: | cool dude [ Sat Jul 01, 2006 11:03 am ] | ||
Post subject: | palindrom | ||
this is wierd because it doesn't show any error in my code, but it doesn't show any output either. although i know that the output should be 9009 because 91 x 99 = 9009 and that is a palindrom since its the same number backwards.
|
Author: | wtd [ Sat Jul 01, 2006 11:53 am ] |
Post subject: | |
You're trying to compare Strings with ==. This is probably not going to do what you expect. Once again, objects and native types in Java behave differently, and String is an object type. |
Author: | cool dude [ Sat Jul 01, 2006 1:16 pm ] |
Post subject: | |
oh yeh. totally forgot. thanks ![]() |