Android Online Quiz

Following quiz provides Multiple Choice Questions (MCQs) related to Android. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - How to pass the data between activities in Android?
A - Intent
B - Content Provider
C - Broadcast receiver
D - None of the Above 
An Intent is used to connect one activity to another activity and having a message passing mechanism between activities.
Q 2 - What is Manifest.xml in android?
A - It has information about layout in an application
B - It has the information about activities in an application
C - It has all the information about an application
D - None of the above
Manifest.xml is having information about application as number components in your application,Activity information,service information, and icon about an application
Each application has at least one Manifest file. Without manifest file we can't generate the APK file.
Q 3 -What are the return values of onStartCommand() in android services?
A - START_STICKY
B - START_NOT_STICKY
C - START_REDELIVER_INTENT
D - All of the above
E - None of the above 
START_STICKY − If android stops services forcefully, using with START_STICKY, it can be restarted automatically without the user interaction.
START_NOT_STICKY − If android stops services forcefully, it will not restart services till user start services.
START_REDELIVER_INTENT − If android stops services forcefully, it will restart services by re-sending an intent.
Q 4 - What is the life cycle of broadcast receivers in android?
A - send intent()
B - onRecieve()
C - implicitBroadcast()
D - sendBroadcast(), sendOrderBroadcast(), and sendStickyBroadcast().
Broadcast receiver has only onReceive() method. Broadcast starts from onRecieve() and control comes out from onRecieve().
Q 5 - What are the wake locks available in android?
A - PARTIAL_WAKE_LOCK
B - SCREEN_DIM_WAKE_LOCK
C - SCREEN_BRIGHT_WAKE_LOCK
D - FULL_WAKE_LOCK 
E - FULL_WAKE_LOCK 
When CPU is on mode, PARTIAL_WAKE_LOCK will be active.
When CPU + bright Screen low  is on mode, SCREEN_DIM_WAKE_LOCK will be active.
When CPU + bright Screen High is on mode,SCREEN_BRIGHT_WAKE_LOCK will be active.
When CPU, Screen, bright Screen High is on mode, FULL_WAKE_LOCK will be active.
Q 6 - What is DDMS in android?
A - Dalvik memory server
B - Device memory server 
C - Dalvik monitoring services
D - Dalvik debug monitor services
DDMS provides port forwarding, screen capturing, memory mapping, logcat, calls, SMS etc.
Q 7 - What is an HTTP client class in android?
A - httprequest(get/post) and returns response from the server
B - Cookies  management
C - Authentication management
D - None of the above
Http request has get and post methods and it returns the response from the servers.
Q 8 - What is fragment life cycle in android?
A - onReceive()
B - onCreate() 
C - onAttach()->onCreate() −> onCreateView() −> onActivityCreated() −> onStart() −> onResume()
D - None of the above
Fragment life cycle is as shown below −
onAttach()
OnCreate()
onCreateView()
onActivityCreated()
onStart()
onResume()
onPause()
onStop()
onDestroyView()
onDestroy()
onDetach()
Q 9 - Is it mandatory to call onCreate() and onStart() in android?
A - No, we can write the program without writing onCreate() and onStart() 
B - Yes, we should call onCreate() and onStart() to write the program
C - At least we need to call onCreate() once
D - None of the above
It is not mandatory, the program will work perfectly without fail, but the programmer has to implement the life cycle of activity.
Q 10 - Can a class be immutable in android?
A - No, it can't  
B - Yes, Class can be immutable
C - Can't make the class as final class
D - None of the above
Class can be immutable.

    46 Lectures 
     7.5 hours 

 Aditya Dua

    32 Lectures 
     3.5 hours 

 Sharad Kumar

    9 Lectures 
     1 hours 

 Abhilash Nelson

    14 Lectures 
     1.5 hours 

 Abhilash Nelson

    15 Lectures 
     1.5 hours 

 Abhilash Nelson

    10 Lectures 
     1 hours 

 Abhilash Nelson
 Print
 Add Notes
 Bookmark this page