java - Error:cannot find symbol -variable -
i'm having problems simple code when creating object of it. i'm using bluej.
public class auto { private string brandname; public car(string brand) { this.brandname = brand; } /** * @return brand name of auto */ public string getbrandname() { homecoming brandname; } }
try enclosing "ferrari" in double quotes create literal string. otherwise looks it's trying find variable named ferarri.
java string
No comments:
Post a Comment