wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Android Quizes 01

Total questions: 50

Worksheet time: 2hrs 40mins

Name
Class
Date
1.

What Android resource directory do we use store our .xlm layout file for tablets?

ما هو المجلد المستخدم لحفظ ملفات التخطيط

XML

لاجهزة التابلت ؟

a)

Layout

b)

Layout-large

c)

Layout-tablet

d)

The name does not matter, it can be called anything

2.

What Android resource directory do we use store our .xlm layout file for smartphones?


ما هو مجلد الموارد المستخدم لحفظ ملفات

xml

للاجهزة السمارت فون ؟

a)

Layout

b)

Layout-large

c)

Layout-phone

d)

The name does not matter, it can be called anything

3.

What resource directory qualifier do we use for creating layout-large?


ما هو المعرف المستخدم لانشاء مجلد تخطيطات للاجهزة الكبيرة ؟

a)

Orientation

b)

Size

c)

UI Mode

d)

Ratio

4.

An .xml file in layout-large can have the same name as an .xlm file in layout?


ملف

xml

موجود داخل مجلد

layout-large

هل يمكن وضع نفس الملف بنفس الاسم داخل مجلد

layout ?

a)

True

b)

False

5.

What listener should your view implement for Click ?


ما هو

Listener

الذي يجب ان تطبقه

View

من اجل التقاط حدث

Click

a)

View.OnClickListener

b)

View.TouchListener

c)

View.OnTouchListner

d)

View.OnSwipeListener

6.

What listener should your view implement for Touch ?


ما هو

Listener

الذي يجب ان تطبقه

View

من اجل التقاط حدث

Touch

a)

View.OnClickListener

b)

View.TouchListener

c)

View.OnTouchListner

d)

View.OnSwipeListener

7.

SetContentView(R.layout.activity_main) is used in activity to set layout?


تستخدم دالة

SetContentView

لتحديد المخطط الخاص بالاكتفتي ؟

a)

True

b)

False

8.

How to fix crash using log cat in android?


كيف يمكنك حل الاخطاء باستخدام

Logcat

في الاندرويد استوديو ؟

a)

Gmail

b)

Log cat contains the exception name along with the line number

c)

Google search

d)

None of the above.

9.

Which of the following is NOT a valid usage for Intents?


اي من التالي لا يعتبر استخدام صحيح ل

Intents

a)

Activate a Activity.

b)

Activate a Service.

c)

Activate a Broadcast receiver.

d)

Activate a SQLite DB Connection.

10.

If ​android app needs to access internet, do we need to add internet permissions in android manifest?


اذا احتاج التطبيق الي الاتصال بالانترنت هل يحتاج التطبيق الي وضع اذن بذلك داخل ملف

manifest

a)

True

b)

False

11.

What is the necessary permission for getting the YouTube Android player to work:​


ما هي الاذونات المطلوبة لجعل تطبيق مشغل اليوتيوب من العمل ؟

a)

Android.permission.INTERNET

b)

Android.permission.ACCESS_NETWORK_STATE

c)

Android.permission.ACCESS_WIFI_STATE

d)

Android.permission.READ_CONTACTS

12.

What is the name of the class used by Intent to store additional information?


ما هو الكلاس المستخدم مع

Intent

من اجل تخزين المعلومات الاضافية ؟

a)

Extra

b)

Parcelable

c)

Bundle

d)

DataStore

13.

Which method should you use to start a sub-activity?


ما هو الاجراء المستخدم من اجل فتح

Sub Activity

a)

startActivity(Intent intent)

b)

startActivityForResult(Intent intent)

c)

startService(Intent intent)

d)

startSubActivity(Intent intent)

14.

Which of the following attributes is used to set an activity screen to landscape orientation?


اي من الخصائص التالية تستخدم لجعل وضعية عرض الاكتفتي تأخذ الوضع الافقي للشاشة

Landscape

a)

screenorientation = landscape

b)

screenOrientation=”landscape”

c)

android:ScreenOrientation=“landscape”

d)

android:screenOrientation=”landscape”

15.

Which of the following does NOT correctly describe interface android.widget.Adapter?


اي من التالي لا يصف بشكل صحيح الانترفيس


android.widget.Adapter

a)

It is an object that acts as a bridge between a View and underlying data for that view.

b)

It provides access to the data items

c)

It provides access to deprecated ListView methods

d)

It is responsible for making a View for each item in the data set

16.

Which of the following lines of code is used to pass a value to the next activity?


اي من الاكواد التالية يستخدم لارسال بيانات الي الشاشة التالية

Next Activity

a)

Intent i = new Intent(this,newActivity);

i.addExtra(“test”); startActivity(i);

b)

Intent i = new Intent(this,newActivity);

i.putValue(“test”); startActivity(i);

c)

Intent i = new Intent(this,newActivity);

i. putValue(“value1”,“test”); startActivity(i);

d)

Intent i = new Intent(this,newActivity);

i. putExtra(“value1”,“test”); startActivity(i);

17.

Is this possible to add views in a layout dynamically?


هل يمكن إضافة ادوات داخل المخطط بصورة اليه

a)

Yes

b)

No

18.

Nesting in layouts is not supported in android


المخططات المتشعبة غير مدعومة في الاندرويد

a)

True

b)

False

19.

When the activity is not in focus, but still visible on the screen it is in?


عندما تكون الاكتفتي غير نشطة ولكنها مرئية علي الشاشة تكون في الحالة

a)

Paused state

b)

Destroyed state

c)

Stopped state

d)

Running state

20.

What runs in the background and doesn't have any UI components?


ما هو الشي الذي يعمل في الخلفية ولا يحتوي علي اي كنترول

a)

Applications

b)

Intents

c)

Services

d)

Content Providers

21.

An implicit intent is the sender specifies the type of receiver?


implicit intent

هو الراسل الذي يحدد نوع المرسل اليه

a)

True

b)

False

22.

Creating a UI (User Interface) in Android requires careful use of


انشاء واجهات للاندرويد يتطلب استخدام

a)

XML and Java

b)

Java and SQL

c)

Dreamweaver

d)

XML and C++

23.

What is an Activity?


ما هو تعريف الاكتفتي ؟

a)

A single screen the user sees on the device at one time

b)

A message sent among the major building blocks

c)

Context referring to the application environment.

d)

A component that runs in the background without any interface.

24.

An activity in a stopped state is doing nothing


الاكتفتي التي في الوضع المتوقف لا تفعل اي شي

a)

True

b)

False

25.

Services have any user interface components


الخدمات تحتوي كنترول

a)

True

b)

False

26.

When an activity doesn't exist in memory it is in.


عندما لا تكون الاكتفتي محملة في الذاكرة تكون في الحالة

a)

Loading state

b)

Running state

c)

Inexistent state.

d)

Starting state

27.

Default value for a member float variable is


القيمة الافتراضية للمتغير من النوع

float

يكون

a)

0.0

b)

0.0f

c)

0

d)

Garbage.

28.

Given that Thing is a class, how many objects and reference variables are created, by following code? (Choose Two)

Thing item, stuff;

item = new Object();

Thing entity = new Object();

a)

One object created

b)

Two objects created.

c)

Three objects created.

d)

Three reference variables created

e)

Two reference variables created.

29.

An object is a blueprint for abstraction

a)

True

b)

False

30.

A static variable can be declared inside a method.


المتغير المعرف بموديفير

Static

يمكن تعريفه داخل اجراء

a)

True

b)

False

31.

An instance member is:


a)

Is also called a static member

b)

Is always a variable

c)

Belongs to a single instance, not to the class as a whole

d)

Is never a method.

e)

Always represents an operation.

32.

How do objects pass messages in Java?


كيف يمكن ارسال رسائل الي الكائنات في جافا

a)

By modifying each other’s variables.

b)

By modifying static member variables of each other’s classes

c)

By calling each other’s instance member methods

d)

By calling each other’s static member methods.

33.

Given the following code, which statements are true?


class X

{

int value1;

}


class Y extends X

{

int value2;

}

a)

Class X extends Y

b)

Class Y is superclass of X

c)

Class Y is subclass of X

d)

Objects of class X will contain variable value2

34.

Given the following code, what is true about it?


import java.io.*;


package P;


public class Other

{

private int val;

}


public class X

{

private Other object;

}

a)

X HAS A Other

b)

The code doesn’t compile, because package statement is second statement

c)

Import statement can never be first statement in a program file

35.

Which statements of the following are true?

اي من العبارات التالية صحيح قم باختياره

a)

In Java, the extends clause is used to specify inheritance

b)

The subclass of a non-abstract class can be declared abstract

c)

All the members of the superclass are inherited by the subclass

d)

A final class can be abstract

e)

A class, in which all the members are declared private, cannot be declared public

36.

Which of the following statements are true?


اي من العبارات التالية صحيح قم باختياره

a)

Inheritance defines a has-a relationship between a superclass and its subclasses

b)

Every Java object has a method named equals()

c)

Every Java object has a method named length()

d)

A class can extend any number of other classes

e)

A non-final class can be extended by any number of classes

37.

Which of the following statements are true?


اي من العبارات التالية صحيح قم باختياره

a)

Subclasses must define all methods that the superclass defines

b)

It is possible for a subclass to define a method with same name and parameters as a method that superclass defines

c)

A subclass cannot access the private members of superclass without using public members of parent class

d)

It is possible for two classes to be superclass of each other

38.

Which of the following statements are true?


اي من العبارات التالية صحيح قم باختياره

a)

Private methods cannot be overridden in subclasses

b)

A subclass can override any method in a non-final superclass.

c)

The parameter list of an overriding method must be a subset of the parameter list of the method that it is overriding

d)

The overriding method can have a different return value than the overridden method

39.

Given classes A, B and C,

where B extends A

and C extends B

and where all classes implement the instance method

void doIt().

How can the doIt() method in A be called from an instance method in C?

a)

DoIt();

b)

Super.doIt();

c)

((A) this).doIt();

d)

It is not possible.

40.

Even when an object is not initialized, a static variable can be accessed

a)

True

b)

False

41.

A static variable is common to all objects of the class


المتغير من النوع

Static

يكون مشترك بين جميع الكائنات الخاصة بالكلاس

a)

True

b)

False

42.

Which type of data is used to enter the value ("Welcome")?


اي نوع من البيانات يستخدم لادخال القيمة

"Welcome"

a)

Text

b)

Characters

c)

String

d)

Boolean

43.

Which type of data is used to enter the value (1234.5)?


اي نوع من البيانات يستخدم لحفظ القيمة

1234.5

a)

Integer

b)

Double

c)

Char

d)

Void

44.

Which type of data is used to enter the value (True)?


اي نوع من البيانات يستخدم لادخال القيمة

True

a)

Float

b)

Boolean

c)

Check box

d)

ٍString

45.

We are use For loop


نحن نستخدم الدوارة

For Loop

a)

To repeat a specified number of operations

b)

To repeat a unspecified number of operations.

c)

All answers are correct

46.

We are use While loop


نحن نستخدم الدوارة

While Loop

a)

To repeat a specified number of operations

b)

To repeat a unspecified number of operations

c)

All answers are correct

47.

Can we have multiple classes in same java file?


هل يمكن الحصول علي اكثر من كلاس داخل ملف جافا واحد

a)

True

b)

False

48.

Which of the following is not a keyword in java?

a)

static

b)

Boolean

c)

void

d)

private

49.

Can we compare int variable with a boolean variable?


هل يمكن مقارنة المتغير من النوع

int

بالمتغير من النوع

boolean

a)

True

b)

False

50.

can we make multi inheritance in java ?


هل يمكننا عمل الوراثة التعددية في الجافا

a)

True

b)

False