7\13 not really sure where to go with this(instructions too vague)


#1

class Dog {
int age;
public Dog(int dogsAge){
age = dogsAge;
}

public static void main(String[] args) {

Dog spike = age(6)
}
}

I cant figure out what I did wrong. Please help.


#2

try this, it worked for me :wink:

class Dog {

int age;

public Dog(int dogsAge) {

age = dogsAge;
}
public static void main(String[] args) {

**Dog spike = new Dog(5);**
}

}


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.