Q2. Complete the following class: public class My IntArray implements Comparable
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Q2. Complete the following class: public class My IntArray implements Comparable
Complete the following class:
public class MyIntArray
implements Comparable<MyIntArray>{
public
int[] a = null;
//
.....................
}
where MyIntArray x is smaller than/greater than/equal to
MyIntArray y if summation of values of elements in x is less
than/greater than/equal to summation of values of elements in
y.
Q2. Complete the following class: public class My IntArray implements Comparable<My IntArcayx{ public int[] a = null; // } where MyIntArray x is smaller than/greater than/equal to MyIntArray y if summation of values of elements in x is less than/greater than/equal to summation of values of elements in y.