public class Password { private static String[] passwords; public Password() { passwords = new String[] {"123", "ABC"}; } public boolean isPasswordAuthentic(String password) { boolean isAuthentic = false; for (int x = 0; x <= passwords.length - 1; x++) { if (password.equals(passwords[x])) { isAuthentic = true; break; } } return isAuthentic; } }
i have a static String array variable. why can i reference it in an instance method?