Question: Java - Comparable and Comparator Interfaces 11. Write code that will compare two Integers p and q and print one of three things... pq. p,
Java - Comparable and Comparator Interfaces
11. Write code that will compare two Integers p and q and print one of three things... "pq". "p", or "p=q" 44.9 12. Repair the following code so that it will work. public static void doSomething(Comparable ob, Object job) { ..some code... Strings = ob.compareTo(job): ...some code. 3 13. Repair the following code so that it will work. public static void doSomething(Object ob. Comparable job) some code.. String s = ob compareTo(job): ...some code. >
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
