Font size
WorksheetsAndroid Quizes 01
Total questions: 50
Worksheet time: 2hrs 40mins
What Android resource directory do we use store our .xlm layout file for tablets?
ما هو المجلد المستخدم لحفظ ملفات التخطيط
XML
لاجهزة التابلت ؟
Layout
Layout-large
Layout-tablet
The name does not matter, it can be called anything
What Android resource directory do we use store our .xlm layout file for smartphones?
ما هو مجلد الموارد المستخدم لحفظ ملفات
xml
للاجهزة السمارت فون ؟
Layout
Layout-large
Layout-phone
The name does not matter, it can be called anything
What resource directory qualifier do we use for creating layout-large?
ما هو المعرف المستخدم لانشاء مجلد تخطيطات للاجهزة الكبيرة ؟
Orientation
Size
UI Mode
Ratio
An .xml file in layout-large can have the same name as an .xlm file in layout?
ملف
xml
موجود داخل مجلد
layout-large
هل يمكن وضع نفس الملف بنفس الاسم داخل مجلد
layout ?
True
False
What listener should your view implement for Click ?
ما هو
Listener
الذي يجب ان تطبقه
View
من اجل التقاط حدث
Click
View.OnClickListener
View.TouchListener
View.OnTouchListner
View.OnSwipeListener
What listener should your view implement for Touch ?
ما هو
Listener
الذي يجب ان تطبقه
View
من اجل التقاط حدث
Touch
View.OnClickListener
View.TouchListener
View.OnTouchListner
View.OnSwipeListener
SetContentView(R.layout.activity_main) is used in activity to set layout?
تستخدم دالة
SetContentView
لتحديد المخطط الخاص بالاكتفتي ؟
True
False
How to fix crash using log cat in android?
كيف يمكنك حل الاخطاء باستخدام
Logcat
في الاندرويد استوديو ؟
Gmail
Log cat contains the exception name along with the line number
Google search
None of the above.
Which of the following is NOT a valid usage for Intents?
اي من التالي لا يعتبر استخدام صحيح ل
Intents
Activate a Activity.
Activate a Service.
Activate a Broadcast receiver.
Activate a SQLite DB Connection.
If android app needs to access internet, do we need to add internet permissions in android manifest?
اذا احتاج التطبيق الي الاتصال بالانترنت هل يحتاج التطبيق الي وضع اذن بذلك داخل ملف
manifest
True
False
What is the necessary permission for getting the YouTube Android player to work:
ما هي الاذونات المطلوبة لجعل تطبيق مشغل اليوتيوب من العمل ؟
Android.permission.INTERNET
Android.permission.ACCESS_NETWORK_STATE
Android.permission.ACCESS_WIFI_STATE
Android.permission.READ_CONTACTS
What is the name of the class used by Intent to store additional information?
ما هو الكلاس المستخدم مع
Intent
من اجل تخزين المعلومات الاضافية ؟
Extra
Parcelable
Bundle
DataStore
Which method should you use to start a sub-activity?
ما هو الاجراء المستخدم من اجل فتح
Sub Activity
startActivity(Intent intent)
startActivityForResult(Intent intent)
startService(Intent intent)
startSubActivity(Intent intent)
Which of the following attributes is used to set an activity screen to landscape orientation?
اي من الخصائص التالية تستخدم لجعل وضعية عرض الاكتفتي تأخذ الوضع الافقي للشاشة
Landscape
screenorientation = landscape
screenOrientation=”landscape”
android:ScreenOrientation=“landscape”
android:screenOrientation=”landscape”
Which of the following does NOT correctly describe interface android.widget.Adapter?
اي من التالي لا يصف بشكل صحيح الانترفيس
android.widget.Adapter
It is an object that acts as a bridge between a View and underlying data for that view.
It provides access to the data items
It provides access to deprecated ListView methods
It is responsible for making a View for each item in the data set
Which of the following lines of code is used to pass a value to the next activity?
اي من الاكواد التالية يستخدم لارسال بيانات الي الشاشة التالية
Next Activity
Intent i = new Intent(this,newActivity);
i.addExtra(“test”); startActivity(i);
Intent i = new Intent(this,newActivity);
i.putValue(“test”); startActivity(i);
Intent i = new Intent(this,newActivity);
i. putValue(“value1”,“test”); startActivity(i);
Intent i = new Intent(this,newActivity);
i. putExtra(“value1”,“test”); startActivity(i);
Is this possible to add views in a layout dynamically?
هل يمكن إضافة ادوات داخل المخطط بصورة اليه
Yes
No
Nesting in layouts is not supported in android
المخططات المتشعبة غير مدعومة في الاندرويد
True
False
When the activity is not in focus, but still visible on the screen it is in?
عندما تكون الاكتفتي غير نشطة ولكنها مرئية علي الشاشة تكون في الحالة
Paused state
Destroyed state
Stopped state
Running state
What runs in the background and doesn't have any UI components?
ما هو الشي الذي يعمل في الخلفية ولا يحتوي علي اي كنترول
Applications
Intents
Services
Content Providers
An implicit intent is the sender specifies the type of receiver?
implicit intent
هو الراسل الذي يحدد نوع المرسل اليه
True
False
Creating a UI (User Interface) in Android requires careful use of
انشاء واجهات للاندرويد يتطلب استخدام
XML and Java
Java and SQL
Dreamweaver
XML and C++
What is an Activity?
ما هو تعريف الاكتفتي ؟
A single screen the user sees on the device at one time
A message sent among the major building blocks
Context referring to the application environment.
A component that runs in the background without any interface.
An activity in a stopped state is doing nothing
الاكتفتي التي في الوضع المتوقف لا تفعل اي شي
True
False
Services have any user interface components
الخدمات تحتوي كنترول
True
False
When an activity doesn't exist in memory it is in.
عندما لا تكون الاكتفتي محملة في الذاكرة تكون في الحالة
Loading state
Running state
Inexistent state.
Starting state
Default value for a member float variable is
القيمة الافتراضية للمتغير من النوع
float
يكون
0.0
0.0f
0
Garbage.
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();
One object created
Two objects created.
Three objects created.
Three reference variables created
Two reference variables created.
An object is a blueprint for abstraction
True
False
A static variable can be declared inside a method.
المتغير المعرف بموديفير
Static
يمكن تعريفه داخل اجراء
True
False
An instance member is:
Is also called a static member
Is always a variable
Belongs to a single instance, not to the class as a whole
Is never a method.
Always represents an operation.
How do objects pass messages in Java?
كيف يمكن ارسال رسائل الي الكائنات في جافا
By modifying each other’s variables.
By modifying static member variables of each other’s classes
By calling each other’s instance member methods
By calling each other’s static member methods.
Given the following code, which statements are true?
class X
{
int value1;
}
class Y extends X
{
int value2;
}
Class X extends Y
Class Y is superclass of X
Class Y is subclass of X
Objects of class X will contain variable value2
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;
}
X HAS A Other
The code doesn’t compile, because package statement is second statement
Import statement can never be first statement in a program file
Which statements of the following are true?
اي من العبارات التالية صحيح قم باختياره
In Java, the extends clause is used to specify inheritance
The subclass of a non-abstract class can be declared abstract
All the members of the superclass are inherited by the subclass
A final class can be abstract
A class, in which all the members are declared private, cannot be declared public
Which of the following statements are true?
اي من العبارات التالية صحيح قم باختياره
Inheritance defines a has-a relationship between a superclass and its subclasses
Every Java object has a method named equals()
Every Java object has a method named length()
A class can extend any number of other classes
A non-final class can be extended by any number of classes
Which of the following statements are true?
اي من العبارات التالية صحيح قم باختياره
Subclasses must define all methods that the superclass defines
It is possible for a subclass to define a method with same name and parameters as a method that superclass defines
A subclass cannot access the private members of superclass without using public members of parent class
It is possible for two classes to be superclass of each other
Which of the following statements are true?
اي من العبارات التالية صحيح قم باختياره
Private methods cannot be overridden in subclasses
A subclass can override any method in a non-final superclass.
The parameter list of an overriding method must be a subset of the parameter list of the method that it is overriding
The overriding method can have a different return value than the overridden method
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?
DoIt();
Super.doIt();
((A) this).doIt();
It is not possible.
Even when an object is not initialized, a static variable can be accessed
True
False
A static variable is common to all objects of the class
المتغير من النوع
Static
يكون مشترك بين جميع الكائنات الخاصة بالكلاس
True
False
Which type of data is used to enter the value ("Welcome")?
اي نوع من البيانات يستخدم لادخال القيمة
"Welcome"
Text
Characters
String
Boolean
Which type of data is used to enter the value (1234.5)?
اي نوع من البيانات يستخدم لحفظ القيمة
1234.5
Integer
Double
Char
Void
Which type of data is used to enter the value (True)?
اي نوع من البيانات يستخدم لادخال القيمة
True
Float
Boolean
Check box
ٍString
We are use For loop
نحن نستخدم الدوارة
For Loop
To repeat a specified number of operations
To repeat a unspecified number of operations.
All answers are correct
We are use While loop
نحن نستخدم الدوارة
While Loop
To repeat a specified number of operations
To repeat a unspecified number of operations
All answers are correct
Can we have multiple classes in same java file?
هل يمكن الحصول علي اكثر من كلاس داخل ملف جافا واحد
True
False
Which of the following is not a keyword in java?
static
Boolean
void
private
Can we compare int variable with a boolean variable?
هل يمكن مقارنة المتغير من النوع
int
بالمتغير من النوع
boolean
True
False
can we make multi inheritance in java ?
هل يمكننا عمل الوراثة التعددية في الجافا
True
False
