Why am I getting a NullPointerException when trying to access an element in an ArrayList?
I’m working on a Java project where I’m using an ArrayList to store user data. However, I’m encountering a NullPointerException when I try to access an element. Here is the relevant code: