This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am writing an applet that recieves two inputs and calculates whether the second input is a multiple of the first and then returns a value of true or false. So I believe I would have to convert my mod result from int to boolean and that is what I can't seem to figure out. or should I just return a string of "true" or "false" here is the code I have written so far but I am still changing it now.
Thank you Ryan Perlman (edited by Cindy to format code) [This message has been edited by Cindy Glass (edited November 05, 2001).]
If you want to take in a int value and return a boolean you set it up like:
Then to use it String answer = Boolean(modulo(number2 % number1)).toString(); This feeds the remainder into the modulo method as an int and returns a boolean, converts to a Boolean and gets the String value of it.
"JavaRanch, where the deer and the Certified play" - David O'Meara