C
cusickgeorge
I am new to programming in Java, hope someone can help.
Please look at the following code:
package George;
public class TestCat
{
public static void main(String[] args)
{
int[] car1 = {5, 4};
int[] maker1 = {3, 6, 6, 2};
Cat num1 = new Cat(car1, maker1);
_____________________________________
This calls a new class Cat as follows . . . .
_____________________________________
package George;
public class Cat
{
private int[] carId;
private int[] makerId;
/**
* Creates a new instance of Cat
*/
public Cat(int[] anCarId, int[] aMakerId)
{
}
Question, the Cat class uses two array arguments and uses them to set
value of car identifier and maker identifier.
How can it do this. What does TestCat send to Cat to start the
process.
Any help appreciated
Please look at the following code:
package George;
public class TestCat
{
public static void main(String[] args)
{
int[] car1 = {5, 4};
int[] maker1 = {3, 6, 6, 2};
Cat num1 = new Cat(car1, maker1);
_____________________________________
This calls a new class Cat as follows . . . .
_____________________________________
package George;
public class Cat
{
private int[] carId;
private int[] makerId;
/**
* Creates a new instance of Cat
*/
public Cat(int[] anCarId, int[] aMakerId)
{
}
Question, the Cat class uses two array arguments and uses them to set
value of car identifier and maker identifier.
How can it do this. What does TestCat send to Cat to start the
process.
Any help appreciated