Array in one class constructor and deep copy of an array - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Array in one class constructor and deep copy of an array

AGZAGZ Posts: 2Member
Hello, this is an school homework task, studying over the net and i've got none to ask in my hometown or friends. only gaming wow and bf3.

This is the start of one class and i'm having troubble with it.

1. the arrays seems to be not right. (seems = is)
2. deep copy, the right array shall be one copy of the left array

[code]class shoes{
private final String brand;
private final String colour;
private final double price;
private final int minSize;
private final int[] left;
private final int[] right;

public shoes(String brand, String colour, double price, int minSize, int[] left, int[] right) {
this.brand = brand;
this.colour = colour;
this.price = price;
this.minSize = minSize;
this.left = new int[] left;
this.right = new int[] right; // thisone shall be one deep copy of the left array.

I'm not asking for one complete solution, would be nice but i've been trying to search on google for tips. and my school book are of no use either on their examples.

is there some example code or web site i could look on ?

Sign In or Register to comment.