XYZ Interview Question

1. Where Static variables/functions are stored in memory in java 2. What is @jvmstatic 3. Why foreground service came, whats the advanatage of using it, why previous service can't be used 4. Difference b/w Thread/Handler/Loopers 5. How will you make a singleton class without using dagger in Java 6. For thread safe which data structure we can use like HashTable and ? Any alternative for HashTable 7. what makes liveData/ViewModel lifecycle aware Ans:- we pass lifecycleOwner into viewmodel we pass this into live data observe()