accessing elements of an array which has been passed as a parameter - Java
===

I have a method which takes an array as a parameter from another class:

    
	public void memPass(Memory[] memLocList) {

		memList = memLocList;
	}

Can anyone tell me how to access the elements of this array from another method, which also takes in a parameter from another class?

I'm trying to do something along these lines:

    public void accessArray(int mem) {

               int someInt = memList[mem].getSomething();
    }

-EDIT- Sorry, I should add that this gives a NullPointerException.