title: How to change the value of a 'public static string
body: <p>Here is my code:</p>
  
  <pre><code>public static String currentStudent = "";
  
  
  public void login() {
    boolean studentLoggedOn = false;
    Student student = new Student();
    PC_Dialog dialog = new PC_Dialog("Enter Login Information", "Student ID, Password-", "OK");
    dialog.choice();
  
    String studentID = dialog.getField(1);
    String password = dialog.getField(2);
  
    student = (Student) projectSystem.studentFile.retrieve(studentID);
  
    if (studentID != null) {
       if (password.equals(student.password)) {
          currentStudent = studentID;
          studentLoggedOn = true;
          studentRun();
       }
    }
  
    if (!studentLoggedOn) {
       JOptionPane.showMessageDialog(null, "Either the user name or the password were incorrect");
       login();
  
  }
     }
  </code></pre>
  
  <p>After all of that, the "<code>currentStudent = studentID;</code>" doesn't seem to have any effect on the currentStudent <code>String</code>?</p>