7.0 Objects

class Dog {

int age;

public Dog(int dogsAge) {

age = dogsAge;

}
public static void main(String args) {

Dog Spike = new Dog(6);


}

}

Don’t capitalize the S in spike :slight_smile:

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