Thanks <@U70GMFHEJ>. Android Studio tells me that ...
# codereview
s
Thanks @kristofdho. Android Studio tells me that I can do away with
private val
. It can be as follows.
Copy code
class MainViewModel @Inject constructor(movieRepository: MovieRepository) : ViewModel() {

    val movieList: LiveData<List<MovieEntry>> = movieRepository.getMovies()
}
It isn't making me much sense when to use val/var and when to not.
Constructor parameters must use var or val when they are used as a property elsewhere in the class.
What does it mean by when used
as a property
? https://stackoverflow.com/questions/45821929/in-which-situation-val-var-is-necessary-in-kotlin-constructor-parameter