Question: Create two classes. Create the first class with two methods. The first method has a return type of Boolean and is called isNegative. It takes
Create two classes. Create the first class with two methods. The first method has a return type of Boolean and is called isNegative. It takes one argument of type int If the argument is negative return true otherwise return false. The second method also has a return type of Boolean and is called isEven. It takes one argument of type int. If the argument is and even integer, return true otherwise return false. Create a second class that has a main method. Ask the user to input an integer. Using the methods from the first class, tell the user if their number is negative or not and tell them if it is an even number or not
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
