Error in Object Oriented Java exercise 2 -Class Syntax


#1

I keep getting error on second exercise which is Class: Syntax

https://www.codecademy.com/en/courses/learn-java/lessons/object-oriented-programming/exercises/classes-syntax


class Dog {




	public static void main(String[] args);

	}

#2

Be sure to pay close attention to the function body delimiters (curly braces)

public static void main(String[] args) {

}

The class needs body delimiters, as well.

class Dog {

}

Putting it all together,

class Dog {

    public static void main(String[] args) {

    }

}

#3

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