7.0 Objects


#1

class Dog {

int age;

public Dog(int dogsAge) {

age = dogsAge;

}
public static void main(String[] args) {

Dog Spike = new Dog(6);


}

}


#2

Don't capitalize the S in spike :slight_smile:


#3

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