Free Associate Android Developer Exam Braindumps (page: 13)

Page 12 of 33

Interface for a callback to be invoked when a shared preference is changed. Interface is named:

  1. android.content.SyncStatusObserver
  2. android.content.SharedPreferences.Editor
  3. android.content.SharedPreferences.OnSharedPreferenceChangeListener
  4. android.content.SharedPreferences

Answer(s): C



With our Context we can get SharedPreferences with a method, named: getSharedPreferences (String name, int mode). What value can we transfer in a “mode”parameter?

  1. MODE_PRIVATE or MODE_PUBLIC
  2. combination of MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE
  3. Value is either 0 or a combination of MODE_PRIVATE, MODE_WORLD_READABLE, D.
    MODE_WORLD_WRITEABLE, and MODE_MULTI_PROCESS

Answer(s): C



What statements about InputStreamReader (java.io.InputStreamReader) are correct? (Choose two.)

  1. An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.
  2. An InputStreamReader is a bridge from character streams to byte streams: It reads characters using a specified charset and encodes them into bytes. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.
  3. Each invocation of one of an InputStreamReader's read() methods may cause one or more bytes to be read from the underlying byte-input stream. To enable the efficient conversion of bytes to characters, more bytes may be read ahead from the underlying stream than are necessary to satisfy the current read operation.
  4. No any invocation of one of an InputStreamReader's read() methods can cause some bytes to be read from the underlying byte-input stream.

Answer(s): A,C



In a class extended PreferenceFragmentCompat. What method is used to inflate the given XML resource and add the preference hierarchy to the current preference hierarchy?

  1. findPreference
  2. getPreferenceManager
  3. addPreferencesFromResource
  4. setPreferenceScreen

Answer(s): C






Post your Comments and Discuss Google Associate Android Developer exam with other Community members:

Associate Android Developer Discussions & Posts