Explore topic-wise MCQs in Black Rock.

This section includes 49 Mcqs, each offering curated multiple-choice questions to sharpen your Black Rock knowledge and support exam preparation. Choose a topic below to get started.

1.

What is the purpose of the ImageSwitcher?

A. The ImageSwitcher enables images to be displayed with animation.
B. The ImageSwitcher displayed images without animation.
C. An image switcher allows you to add some transitions on the images
D. Option A and C are correct.
Answer» E.
2.

How to get feedback on message sent?

A. Use two Intent objects in the sendTextMessage() method.
B. Use two PendingIntent objects in the sendTextMessage() method.
C. Use two PendingIntent objects in the startActivity() method.
D. None of the above.
Answer» C. Use two PendingIntent objects in the startActivity() method.
3.

What code you will write to send the SMS to another AVD? Suppose that the AVD no is 5556

A. SmsManager sms=new SmsManager(); sms.sendTextMessage("5556", null, "Hello Android", null, null);
B. SmsManager sms=new SmsManager(); sendSMS("5556", null, "Hello Android", null, null);
C. SmsManager sms=SmsManager.getDefault(); sms.sendTextMessage("5556", null, "Hello Android", null, null);
D. None of the above.
Answer» D. None of the above.
4.

Which class is used to send SMS programmatically?

A. SmsSender
B. SmsManager
C. SMS
D. None of the above.
Answer» C. SMS
5.

Which permission you need to declare in your AndroidManifest.xml file for sending SMS.

A. <uses-permission android:name="android.permission.SEND_SMS"/>
B. <uses-permission android:name="android.SEND_SMS"/>
C. <uses-permission ="android.permission.SEND_SMS"/>
D. None of the above.
Answer» B. <uses-permission android:name="android.SEND_SMS"/>
6.

What is Android Interface Definition Language (AIDL)?

A. AIDL does not the Java programming language.
B. It does not define the programming interface.
C. It defines the programming interface that both the client and service agree upon in order to communicate with each other using inter process communication (IPC).
D. None of the above.
Answer» D. None of the above.
7.

For Creating your own content provider which class you will inherit?

A. Content
B. ContentProvider
C. Object.
D. None of the above.
Answer» C. Object.
8.

What are the predefined query string constants available in Android?

A. ContactsContract.Contacts.CONTENT_URI
B. Browser.SEARCHES_URI
C. MediaStore.Images.Media.INTERNAL_CONTENT_URI
D. All of the above.
Answer» E.
9.

SimpleCursorAdapter object maps a cursor to which view, defined in your XML file?

A. TextViews
B. ImageViews
C. Both A and B option are correct.
D. None of the above.
Answer» D. None of the above.
10.

For reading the contacts from the Contacts, Which permission you will set in AndroidManifest.xml file if you are using ContentProvider.

A. FIND_CONTACTS
B. GET_CONTACTS
C. READ_CONTACTS
D. None of the above.
Answer» D. None of the above.
11.

To query a content provider, you specify the query string in the form of a URI. The format of the query URI is as follows: &lt;standard_prefix&gt;://&lt;authority&gt;/&lt;data_path&gt;/&lt;id&gt; What you will write in place of &lt;standard_prefix&gt; ?

A. content
B. object
C. ContentProvider
D. None of the above.
Answer» B. object
12.

To share data across packages in Android which object you will prefer?

A. SharedPreference
B. ContentProvider
C. DataProvider
D. None of the above.
Answer» C. DataProvider
13.

Which one is not a nickname of android OS?

A. Honeycomb
B. CupCake
C. Muffin
D. None of the above.
Answer» D. None of the above.
14.

What runs in the background and does not have any user interface?

A. PendingIntent
B. Service
C. Intent
D. None of the anove.
Answer» C. Intent
15.

Android provides the following functionality.

A. Security
B. Networking
C. Portability
D. All of the above.
Answer» E.
16.

&nbsp;What is the full form of AVD in Android?

A. Android Virtual Device
B. Android Virtual Display
C. Actual Virtual Display
D. All of the above.
Answer» B. Android Virtual Display
17.

Which of the following statements is correct?AZ

A. Permissions are not specified in AndroidManifest.xml.
B. The AndroidManifest.xml is optional.
C. The AndroidManifest.xml must supply a unique Application package name for your App.
D. None of the above.
Answer» D. None of the above.
18.

If you want share the data from one application to other applications,ou will which object you will use?

A. SQLiteDatabases
B. InternalStorage
C. SharedPreferences
D. ContentProvider
Answer» E.
19.

To check whether the media(external storage) is available, which method of Environment class you will use?

A. getExternalStorageState()
B. getExternalStorage()
C. getExternalStateData()
D. None of the above.
Answer» B. getExternalStorage()
20.

In order to use internal storage to write some data in the file, which method will be used?This method returns FileOutputStream.&nbsp;

A. openFileInput()
B. openFileOutput()
C. openForWrite()
D. None of the above.
Answer» C. openForWrite()
21.

To write files on the external storage, which permission you will write in AndroidManifest.xml file

A. WRITE_STORAGE
B. WRITE_EXTERNAL_DATA
C. WRITE_EXTERNAL_STORAGE
D. None of the above.
Answer» D. None of the above.
22.

You want to read website name by using SharedPreferences. Choose the correct option for doing this.

A. SharedPreferences obj=getSharedPreferences("MySharedFile ", Context.MODE_PRIVATE); String n=obj.getString("name", null);
B. SharedPreferences obj= new SharedPreferences ("MySharedFile", Context.MODE_PRIVATE); String n=obj.getString("name", null);
C. String n=obj.getString("name", null);
D. None of the above.
Answer» B. SharedPreferences obj= new SharedPreferences ("MySharedFile", Context.MODE_PRIVATE); String n=obj.getString("name", null);
23.

You want to store website name by using SharedPreferences. Choose the correct option for doing this.

A. SharedPreferences obj=getSharedPreferences("MySharedFile", Context.MODE_PRIVATE); obj.putString(“name”, “CareerRide.com”); obj.commit();
B. SharedPreferences obj= new SharedPreferences ("MySharedFile", Context.MODE_PRIVATE); String n=obj.getString("name", null);
C. SharedPreferences obj=getSharedPreferences("MySharedFile", Context.MODE_PRIVATE); Editor editor=obj.edit(); editor.putString(“name”, “CareerRide.com”); editor.commit();
D. None of the above.
Answer» D. None of the above.
24.

Which objects stores only primitive data type?

A. SharedPreferences
B. SQLiteDatabase
C. ContentProvider
D. None of the above.
Answer» B. SQLiteDatabase
25.

&nbsp;SharedPreferences stores the data in which format?

A. TXT
B. XML
C. DOC
D. None of the above.
Answer» C. DOC
26.

Which objects stores the data only in key-value pair?

A. SharedPreferences
B. SQLiteDatabase
C. ContentProvider
D. None of the above.
Answer» B. SQLiteDatabase
27.

What is/are storage option available in android?

A. SharedPreferences
B. SQLiteDatabase
C. ContentProvider
D. All of the above.
Answer» E.
28.

For creating Fragments the java class needs to extend which base class?

A. MainActivity
B. MiniActivity
C. Fragment
D. None of the above.
Answer» D. None of the above.
29.

How will you get the data in secondActivity? Refer question 10.

A. Intent intent=new Intent; String str= intent.getStringExtra("name"); Toast.makeText(this, str , Toast.LENGTH_LONG).show();
B. Intent intent=getIntent(); String str= intent.getStringExtra("name"); Toast.makeText(this, str , Toast.LENGTH_LONG).show();
C. Intent intent=getIntent(); String str= intent.getText("name"); Toast.makeText(this, str , Toast.LENGTH_LONG).show();
D. None of the above.
Answer» C. Intent intent=getIntent(); String str= intent.getText("name"); Toast.makeText(this, str , Toast.LENGTH_LONG).show();
30.

Suppose that there are two activities in an application named FirstActivity and SecondActivity. You want to send website name from ActivityOne to ActivityTwo. What code you will write? Suppose that website name is &ldquo;CareerRide.com&rdquo;

A. Intent intent=new Intent (this, SecondActivity.class); intent.putExtra("name", “CareerRide.com”); startActivity(intent);
B. Intent intent=new Intent (this, SecondActivity.class); intent.putExtra( “CareerRide.com”); startActivity(intent);
C. Intent intent=new Intent (); intent.putExtra("name", “CareerRide.com”); startActivity(intent);
D. None of the above.
Answer» B. Intent intent=new Intent (this, SecondActivity.class); intent.putExtra( “CareerRide.com”); startActivity(intent);
31.

How will you reference a textbox control in java file, that is available in XML file and the ID is txtName.

A. EditText txtEmpName; txtEmpName=findViewById(R.id.txtName);
B. EditText txtEmpName; txtEmpName=(EditText)findViewById(R.id.txtName);
C. EditText txtEmpName; txtEmpName=(EditText)findViewById(txtName);
D. None of the above.
Answer» C. EditText txtEmpName; txtEmpName=(EditText)findViewById(txtName);
32.

In android mini-activities are also known as.

A. Adapter
B. Activity
C. Fragments
D. None of the above.
Answer» D. None of the above.
33.

The types of intents in android is\are

A. Explicit intents
B. Implicit intents
C. Start intents
D. Option A and B are correct.
Answer» E.
34.

If you want to navigate from one activity to another then android provides you which class?

A. Object
B. startActivity
C. Intent
D. None of the above.
Answer» D. None of the above.
35.

If you need to pass data back from an activity, Which method you should use?

A. startActivity()
B. startActivityForResult()
C. ActivityForResult()
D. None of the above.
Answer» C. ActivityForResult()
36.

&nbsp;The Log class supports which log types?

A. Error
B. Warning
C. Debug
D. All of the above.
Answer» E.
37.

What is the permission for using the camera?

A. android.permission.USE_CAMERA
B. android.permission.CAMERA
C. android.permission.hardware.CAMERA
D. None of the above.
Answer» C. android.permission.hardware.CAMERA
38.

Suppose that there are two activities in an application named ActivityOne and ActivityTwo. You want to invoke ActivityTwo from ActivityOne. What code you will write?

A. Intent intent=new Intent (this, ActivityTwo.class); startActivity(intent);
B. startActivity(new Intent(this, ActivityTwo.class));
C. Option A and B are correct.
D. None of the above.
Answer» D. None of the above.
39.

Which tool is used to monitor and control the Emulators on which you are debugging your applications.

A. Android Asset Packaging Tool (AAPT)
B. Dx
C. DDMS
D. None of the above.
Answer» D. None of the above.
40.

&nbsp;In Android, visual components are called.

A. Views
B. Components
C. DLL
D. None of the above.
Answer» B. Components
41.

Choose the correct option regarding activity in android.

A. Activity is a class.
B. When you create an android application your activity (class) is, by default inherited from Activity class.
C. Option A and B are correct.
D. None of the above.
Answer» D. None of the above.
42.

What is the full form of DDMS?

A. Dalvik Debug Monitoring Service
B. Dalvik Design Monitoring Service
C. Direct Debug Monitoring Service
D. None of the above.
Answer» B. Dalvik Design Monitoring Service
43.

Which virtual machine is used by Android to run application?

A. JVM
B. Dalvik VM
C. AVD
D. None of the above.
Answer» C. AVD
44.

In which file, all string constant should be stored in android?

A. AndroidManifest.xml
B. Bin
C. strings.xml
D. None of the above.
Answer» D. None of the above.
45.

&nbsp;In which file, permissions are set in Android?

A. Src
B. AndroidManifest.xml
C. Bin
D. None of the above.
Answer» C. Bin
46.

What is true about an Android Virtual Device (AVD)?

A. An AVD is an emulator instance that enables you to model an actual device.
B. You can create more than one AVDs in order to test your applications with several different configurations.
C. You cannot create more than one AVDs.
D. Option A and B are correct.
Answer» E.
47.

What is used by android for relational data storage?

A. Tomcat
B. SQL
C. SQLiteDatabase
D. None of the above.
Answer» D. None of the above.
48.

Android is open source true or false?

A. True
B. False
Answer» B. False
49.

What is the use of versionCode attribute in AndroidManifest.xml file?

A. It is used to define the current application version.
B. It is used to define the current application name.
C. It is used to define the public version that will be displayed to users.
D. None of the above.
Answer» B. It is used to define the current application name.