|
What is wrong with this code?
public class Dog extends Mammals {
public Dog(String name, String type) {
super(name, type);
}
public String sound{
System.out.println("Hello");
}
}
Syntax error. Insert ";" to complete FieldDeclaration.
The error appears under "sound" which is underlined with the error
|