I have a class called "setup" that has a method that returns a string
public class Setup{
public String getPW(){ return "pAssWord";}
}
I imported "Setup", tried to assign it to private static String, and then the system throws this error.
public class Something {
private Setup v_var= new Setup();
private static String password = v_var.getPW();
}
It accepts the hardcoded string, but not method called String. Can someone explain me a logic behind this?