7/13 Did you create a Dog object using the Dog constructor? Make sure you indicate an integer parameter


What is wrong with my code?

class Dog {

int age;

public Dog(int dogsAge) {

age = dogsAge;


public static void main(String[] args) {

Dog spike = new Dog (6);



Just worked out it's the space between the Dog and the (6) :slight_smile:


4 posts were split to a new topic: 7. i'm stuck


A post was split to a new topic: Why it does not work?