hw2
Class Adder
java.lang.Object
hw2.Adder
public class Adder
- extends Object
Adder asks the user for two ints and computes their sum.
This is part of HW2: Environment Setup and Java Introduction for CSE 331.
Constructor Summary |
Adder()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Adder
public Adder()
main
public static void main(String[] args)
computeSum
public static int computeSum(int x,
int y)
- Parameters:
x
- First number to sum.y
- Second number to sum.
- Returns:
- sum of x and y.