Hi i'm getting the error:
cannot find symbol - variable Andrew for this method.
What do I need to change?
/**
* Create a method that says hi if the name is the same as yours and go away otherwise.
*
* @author (your name)
* @version (a version number or a date)
*/
public class String
{
public void greeting(String name) {
String myName;
myName = Andrew;
if (name == myName) {
System.out.println("Hi");
}
else {
System.out.println("Go away");
}
}
}