- Make a static method that takes in two numbers and multiples them and returns the result. Call it multiplier(int x, int y)!
- Make a static method that takes in two integers and returns the lower of the two
call it findMinimum()
print out the results! - Make a static method, call it dividerOfTwoNumbers(int x, int y){ }
Ask the user for two numbers. Divide the first number by the second number IF the second number is not zero.
If they enter a zero, tell them: "You fool! You can't divide by zero!"
Monday, October 6, 2008
Static method practice in class
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment