Update Memory.java

Updated method header fix