public void setAuthor(String authorName)
{
authorName = authorName;
}
here compiler gets ambiguity because of parameter of function and class variable having same name.
public...
Type: Posts; User: kirannayana
public void setAuthor(String authorName)
{
authorName = authorName;
}
here compiler gets ambiguity because of parameter of function and class variable having same name.
public...
U had declared variables but didn't assigned the values yet.
It is suggestion that u must know about "local variable and class variable " and u must know about "this" keyword in java it help in...