有人可以解释一下这段代码有什么问题吗?
SharedPreferences sortMethod = getApplicationContext().getSharedPreferences("sortMethod", MODE_PRIVATE);
sortMethod.edit().putInt("myInt", 1).apply();
int myInt = getApplicationContext().getSharedPreferences("myInt", MODE_PRIVATE).getInt("myInt", -1);