Course Solutions Uncategorized (Solved) : Need Help One Piece Java Code Need Code Run Successfully Add Items Collection Need Modify Q29822395 . . . .

(Solved) : Need Help One Piece Java Code Need Code Run Successfully Add Items Collection Need Modify Q29822395 . . . .

 

I need help with this one piece of java code. I need this codeto run and successfully add items into the collection. So I need tomodify line 10 to be whatever. Just adding them to the array. Hereis my code so far. This is the only part I havent solved of theoverall assignment

interface ICompMeth {

int comp(int pos, int value);

}

class Collection {

private int[] nums;

  

public Collection(int … list) {

// TODO: Implement this method

nums.add(int … list); //here

}

  

public int size() {

// TODO: Implement this method

return nums.length;

}

  

public int get(int index) {

// TODO: Implement this method

return nums[index];

}

  

public void printAll() {

System.out.print(“Numbers: “);

for (int n : nums) {

System.out.print(n

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post