Android is a mobile operating system based on the Linux kernel and designed primarily for touchscreen mobile devices. Being familiar with the Android ecosystem is a prerequisite for designing apps efficiently.
To have persistence between executions of an application, reading and writing data from a form of storage must be used.
Public questions (free account) are common interview questions. They are great for practicing, or if you want to filter candidates using the classic problems.
What is the value of String number after the following code snippet:
SharedPreferences pref = getApplicationContext().getSharedPreferences("MyPref", MODE_PRIVATE); Editor editor = pref.edit(); editor.putString("1", "2"); editor.putString("3", "4"); editor.commit(); String number = pref.getString("2", "3");