Q2. Complete the following class: public class My IntArray implements Comparable
Posted: Sat Nov 27, 2021 2:30 pm
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.
Q2.
Posted: Sat Nov 27, 2021 2:30 pm
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.