Question: IN JAVA PLS. Create a class named BothGreater that stores two int values set by the constructor. Neither should be publicly visible. BothGreater should also
IN JAVA PLS.
Create a class named BothGreater that stores two int values set by the constructor. Neither should be publicly visible. BothGreater should also implement the Java Comparable
You will probably need to review the documentation for Comparable. Because we are using the type parameter BothGreater to the Comparable interface, compareTo accepts an BothGreater as an argument.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
