View Single Post
Old 10-31-2012, 05:48 PM   PM User | #1
andynov123
Regular Coder

 
Join Date: Oct 2010
Posts: 246
Thanks: 8
Thanked 1 Time in 1 Post
andynov123 is an unknown quantity at this point
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
andynov123 is offline   Reply With Quote