What am I doing wrong?


#1

I just started the java tutorial and I have already hit a problem. In the Classes part, the Constructors part of it either has a problem, or I am just being dumb. it says to follow the example and create a class constructor. The example is:

class Car {

//The class constructor for the Car class
public Car() {

}

}

And the default editor looks like:

class Dog {

public static void main(String[] args) {

}

}

So, I added the public Dog () {, like it said in the example, to get:

class Dog {

public Dog() {

public static void main(String[] args) {

}

}

I get several errors when I do this, but as far as I know that is exactly what the directions are saying. The instructions only to "Add a class constructor called Dog to the class." If someone could let me know what to do to fix this that would be great. Thanks!


#2

After browsing a bit more I was able to find the answer I needed. it was a } on the line after public Dog() {. It would be great if this was fixed, because no where does it say to add that.


#4