Question: Write a Java function called compare that takes 2 numbers and compares them and outputs the result. Your function should compare them for being equality
1046 is less than 2379.
1046 is less than equal to 2379.
The prototype for the function is the following: You must write the body of the function.
public void compare(int x, int y)
{
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
