問題1
For example, we have a file in our raw folder app/src/main/res/raw/sample_teas.json. To get an InputStream for reading it, from out Context context, we can do this:
For example, we have a file in our raw folder app/src/main/res/raw/sample_teas.json. To get an InputStream for reading it, from out Context context, we can do this:
正確答案: B
問題2
Which statement is most true about layout_constraintLeft_toRightOf and layout_constraintStart_toEndOf constraints ?
Which statement is most true about layout_constraintLeft_toRightOf and layout_constraintStart_toEndOf constraints ?
正確答案: C
說明:(僅 NewDumps 成員可見)
問題3
In application theme style, flag windowActionBar (<item name="windowActionBar">) indicates:
In application theme style, flag windowActionBar (<item name="windowActionBar">) indicates:
正確答案: C
說明:(僅 NewDumps 成員可見)
問題4
An example. In our ViewModelFactory (that implements ViewModelProvider.Factory) we have an instance of our Repository, named mRepository. Our ViewModel has such constructor:
class MyViewModel(private val mRepository: MyRepository) : ViewModel() ...
Next, in our ViewModelFactory create ViewModel method (overriden) looks like this:
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
return try {
//MISSED RETURN VALUE HERE"
} catch (e: InstantiationException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
} catch (e: IllegalAccessException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
} catch (e: NoSuchMethodException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
} catch (e: InvocationTargetException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
}
}
What should we write instead of "//MISSED RETURN VALUE HERE"?
An example. In our ViewModelFactory (that implements ViewModelProvider.Factory) we have an instance of our Repository, named mRepository. Our ViewModel has such constructor:
class MyViewModel(private val mRepository: MyRepository) : ViewModel() ...
Next, in our ViewModelFactory create ViewModel method (overriden) looks like this:
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
return try {
//MISSED RETURN VALUE HERE"
} catch (e: InstantiationException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
} catch (e: IllegalAccessException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
} catch (e: NoSuchMethodException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
} catch (e: InvocationTargetException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
}
}
What should we write instead of "//MISSED RETURN VALUE HERE"?
正確答案: B
問題5
What is the incorrect statement about Data Access Object (androidx.room.Dao)?
What is the incorrect statement about Data Access Object (androidx.room.Dao)?
正確答案: C
問題6
A class that you create for managing multiple data sources. In addition to a Room database, this class could manage remote data sources such as a web server. It is about:
A class that you create for managing multiple data sources. In addition to a Room database, this class could manage remote data sources such as a web server. It is about:
正確答案: C