Test 1
 
Question 1
 
Which of the following are properties that can be set in the View?
 
Screen orientation.
 
Visibility.
 
The opacity (transparency).
 
Position.
 
Question 2
 
The AutoCompleteTextView is a subclass of the ViewGroup.
 
Yes
 
No
 
 
 

Question 3

 
Which of the following statements describes the relationship between the AdapterView and adapter?
 
The AdapterView creates views of the data in the adapter.
 
The adapter manages a set of data for the AdapterView.
 
The adapter is requesting views from the AdapterView.
 
Adapters can notify the AdapterView when data of the adapter changed.
 
Question 4
 
Assume that a layout file declares a LinearLayout, which is called the LL and contains two child views View1 and View2. In the layout file, the View1 is declared with the android:layout_weight=2 and layout_dp. The View2 is declared with the android:layout_weight=3 and layout_dp. In this example, which of the following statements are true?
 
View1 occupies 2/3 of the width of the LL.
 
View2 takes 3/5 the width of the LL.
 
View2 occupies 2/3 of the width of the display.
 
View1 takes 2/5 of the width of the display.
 
Question 5
 
When a user presses for a long time on the view registered to show a context menu, which of the following methods will be called?
 
setHasOptionsMenu().
 
registerForContextMenu().
 
onCreateContextMenu().
 
onContextItemSelected().
 
Question 6
 
Assume that the application wants to create and display a dialog box. If the application builds a dialog in the DialogFragment, what method of the DialogFragment will be called to make it appear to the user?
 
show()
 
onCreateView()
 
showFragment().
 
dismiss()
 
Question 7
 
The ActionBar has four functional areas: an application icon, the view control area, the action button area, and overflow area. What is the purpose of the overflow area?
 
The overflow area displays a drop-down list to access frequently used functions.
 
When the action button can not fit in or should not be placed on the action bar, it is displayed in a separate window that is accessible at the touch of an overflow icon.
 
This is the default location of the action buttons.
 
The overflow area allows a user to navigate back to previous points in the Task Back Stack.
 
Question 8
 
Which of the following is the motive for the use of threads in Android?
 
To improve performance on multi-core platforms.
 
To make a program easier to debug.
 
To improve the application response.
 
To simplify the structure of the program with respect to event-driven programming.
 
To make more deterministic the behavior of the program in relation to the execution order.
 
Question 9
 
Which of the following is an example of the Android framework of parallel computing?
 
The class Java Thread provides a computing unit that operates in the context of the process.
 
The Android Service framework provides computing and communications to work in the background.
 
The Android "Handler Messages and Runnables" (HaMeR) framework allows you to run operations in one or more background threads, publishing its results in the UI thread.
 
The Android AsyncTask framework allows you to run operations in one or more background threads and publish the results in the UI thread, without manipulation the thread or handler.
 
Question 10
 
Which of the following elements of implementation is unique to each thread?
 
Runtime stack
 
Runtime heap
 
Program counter
 
Static data area
 
Question 11
 
Which of the following is the method by which the program can run a Java Thread?
 
Implement the Runnable interface, override its run() method, pass the Runnable object to the constructor of the new object Thread, and call the start() method of the object Thread.
 
Extend the Thread class, override its run() method, and call the start() method of an instance of the extended class Thread.
 
Extend the Thread class, override its run() method, and explicitly call the run() method from the application code to start the thread without calling its start() method explicitly.
 
Question 12
 
Which of the following statements is true?
 
If a user code in the Java Thread calls the wait(), join(), or sleep(), these methods check the InterruptedException.
 
Using a logical mutable flag "stop" automatically wakes the blocking wait(), join(), sleep() calls.
 
The only reliable and portable way to stop the Java thread is to call its method stop().
 
The Thread interrupt() method behaves as a traditional hardware and system interruption, it automatically stops the thread regardless of the thread is doing.
 
Question 13
 
Which of the following statements is true about the life cycle of the Java Thread?
 
When a Java program calls the sleep(), the thread moves to the locked state.
 
When the Thread method run() returns, the thread moves to the Runnable state.
 
When a Java program creates a Thread object, this object is initially in the Runnable state.
 
When Android Linux scheduler selects a thread to execute it, the thread goes to the Runnable state.
 
Question 14
 
Which of the following is a key difference between the frameworks HaMeR and AsyncTask?
 
Classes in the HaMeR are loosely coupled, while classes in the AsyncTask are closely related.
 
Classes in the HaMeR are closely related, while classes in the AsyncTask are loosely coupled.
 
You can use the framework AsyncTask without manipulating threads, handlers, messages, or Runnable objects explicitly.
 
You can use the framework HaMeR without manipulating threads, handlers, messages, or Runnable objects explicitly.
 
Question 15
 
Which of the following is the motivation for Android frameworks of parallel computing?
 
It increases productivity by combining communications and computing on multicore platforms.
 
It runs short operations in a background thread and time-consuming operations on the UI thread.
 
It improves the portability of applications to different implementations of virtual machines Java.
 
It protects developers from the tedious and error-prone aspects of the design constraints of the Android platform.
 
Question 16
 
Which template is used to Looper, ensuring that there is only one Looper for a thread?
 
Template Method
 
Guarded Suspension
 
Thread-Specific Storage
 
Active Object
 
Question 17
 
Which template allows the class HandlerThread to create the desired handlers by overriding the method onLooperPrepared?
 
Template Method
 
Guarded Suspension
 
Thread-Specific Storage
 
Active Object
 
Question 18
 
Which of the following features the Handler provides to an application?
 
Perform Runnable tasks consequentially or in the thread pool.
 
Interact with the Looper to serialize message processing in the thread, with which it is associated.
 
Send Message objects and/or publish Runnable objects in the Looper in the handler thread.
 
Run and cancel asynchronous computation, request to see if the calculations are complete, and receive the results of calculations.
 
Question 19
 
Which of the following are the key patterns supported by the Handler?
 
Command Processor
 
Active Object
 
Guarded Suspension
 
Strategy
 
Question 20
 
Which of the following features of the pattern Command Processor used by the class Android Handler?
 
It enables to select messages from the global pool, setting the various fields of the message.
 
It allows the handleMessage() method of the Handler to be directed to different threads, not to the client that sent the message.
 
It allows the Runnable be processed at a later time in the same thread as the client that placed the Runnable.
 
It allows the Runnable to be handled in a different thread than the client that placed the Runnable.
 
Question 21
 
Which of the following is the reason that sending a message to the handler is more difficult than placing the Runnable in a handler?
 
The Handler should be expanded and its handleMessage() method should be overridden for the processing of the received messages.
 
The Handler logic is localized at the point, where the send() method is called.
 
The Handler provides methods that allow the program to implement the behavior of the synchronization.
 
The handler defines the methods that allow the program to use the message queue associated with the Looper thread.
 
Question 22
 
Which of the following is an advantage of the framework AsyncTask compared with the framework HaMeR?
 
Users of the AsyncTask framework should have a deep understanding of regularities that define the structure and the interaction between the classes, which the framework uses within itself.
 
The AsyncTask framework does not require application developers to manipulate directly threads, handlers, messages, and Runnable objects.
 
The tight integration of classes in the framework AsyncTask facilitates their use by reducing the "surface area" of the API, which the framework provides to applications.
 
The weakly integration of classes in the framework AsyncTask facilitates their use by reducing the "surface area" of the API, which the framework provides to applications.
 
Question 23
 
Which of the following is a way that the framework AsyncTask extends the pattern Template Method?
 
It postpones some of the steps in the parallel processing algorithm for a subclass.
 
It allows subclasses to override its methods.
 
It allows its methods work in different control threads.
 
It separates the interface from the implementation, so they can change independently.
 
Question 24
 
Which of the following frameworks is used within the framework Android AsyncTask?
 
Java Executor
 
Android IntentService
 
Android HaMeR
 
Android Activity
 
Question 25
 
Which of the following is the default behavior of the AsyncTasks in the latest versions of Android?
 
A Java ThreadPoolExecutor instance is used to execute each AsyncTask object.
 
A thread pool runs multiple AsyncTasks simultaneously in a process to use multi-core chipsets.
 
The Android HaMeR framework is used within the framework AsyncTask to send messages from a background thread to the UI thread.
 
The single background thread in each process starts all doInBackground() methods of the AsyncTasks.
 
Question 26
 
Which of the following are the different ways to load an image parallel?
 
Performing AsyncTasks.
 
Calling a remote method via the Binder.
 
Placing and processing a Runnable.
 
Sending and processing of messages.
 
Question 27
 
Which of the following is an advantage of the AsyncTask framework in relation to the framework HaMeR?
 
It provides a low overhead for the synchronization, context switching, and data movement.
 
It is easy to use for both simple and complex applications that use parallel computing.
 
It provides a relatively transparent scalability through its use of the Java Thread Pool Executor.
 
It allows communication between multiple background threads.
 
Question 28
 
Which of the following best describes the ways in which the threads interact in the HaMeR and AsyncTask frameworks?
 
Background threads in the AsyncTask directly interact with the UI thread.
 
Background threads in the HaMeR implicitly interact with the UI thread.
 
Background threads in the AsyncTask implicitly interact with the UI thread.
 
Background threads in the HaMeR directly interact with the UI thread.
 
Question 29
 
Which of the following Gang-of-Four patterns is applied to the Android framework of parallel computing?
 
Active Object
 
Template Method
 
Visitor
 
Monitor Object
 
Strategy
 
Factory Method
 
Question 30
 
Which of the following POSA patterns is applied to the Android framework of parallel computing?
 
Command Processor
 
Extension Interface
 
Bridge
 
Template Method
 
Half-Sync/Half-Async
 
Thread-Specific Storage
 
Question 31
 
Which of the following patterns is applied in appropriate frameworks?
 
The Active Object is used in the Java ExecutorService.
 
The Bridge is applied to the HaMeR.
 
The Command Processor is used in the HaMeR.
 
The Factory Method is used in the AsyncTask.
 
The Strategy is applied to the HaMeR.
 
The Thread-Specific Storage is used in the Java Executor.
 
Question 32
 
Which of the following is an advantage of using the pattern Thread-Specific Storage?
 
It allows subclasses to override methods.
 
It separates the interface from the implementation, so they can change independently.
 
It reduces the overhead of sync to access the object.
 
It postpones some of the steps in the parallel processing algorithm for a subclass.
 
Question 33
 
Which of the following is a well-known application of the pattern Thread-Specific Storage?
 
The class Android Looper.
 
The Java Executor Framework.
 
The standard C errno macro.
 
The Android IntentService.
 
Question 34
 
Which of the following is a purpose of the pattern Command Processor?
 
Determine the service request as a unit of parallel computation and launch service requests in different threads from the requesting client thread.
 
Provide multiple threads to use a single "logical global" access point without the overhead of locking the access to each object.
 
Pack a functionality of the application and its parameterization in an object to make it suitable for use in a different context.
 
Separate asynchronous and synchronous handling of the service in a system of parallel computing by introducing two connected layers - one layer to the asynchronous and another to the synchronous handling of the service to simplify programming without excessive loss of productivity.
 
Question 35
 
Which of the following is a negative effect of the use of the pattern Command Processor?
 
Support for bilateral operations requires additional programming efforts.
 
The client is not blocked during the processing.
 
Functionality is controlled by the sender, but not the recipient.
 
Support for context application logic depended from the runtime.
 
Question 36
 
Which of the following is an example of a situation where the pattern Active Object is used?
 
When the object's methods may be blocked for a long time during their execution.
 
When additional features should be implemented consistently for all requests to the service.
 
When the object interface methods must define its borders of parallel computation.
 
When there is a need to separate the decision about which piece of code to be executed from the decision which context should happen.
 
When it is necessary for the modernization of inherited code to be thread-safe.
 
When multiple requests of the client method can work simultaneously on the object.
 
Question 37
 
Which of the following is the known use of the pattern Active Object?
 
Android IntentService Framework.
 
Java ExecutorService Framework.
 
Java Executor Framework.
 
Android HaMeR Framework.
 
Question 38
 
Which of the following best describes the motivation for the pattern Half-Sync/Half-Async?
 
To ensure improvements to the service provided by a component, without breaking an existing code.
 
Separate short-term operations from the long-running operations in programs with parallel computing.
 
Simplify programming of parallel computing without excessive loss of productivity.
 
To ensure that only one Looper is in each thread in the program with parallel computing.
 
Question 39
 
Which of the following correctly describes the Android service?
 
Service is a component of an application that provides a single, focused item to the user.
 
Service is a component of an application that responds to system-wide broadcast messages.
 
Service is a component of an application that can perform time-consuming operations in the background and has not a user interface.
 
Service is an application component that controls access to a structured set of data by encapsulating the data and providing a mechanism to determine the safety of data.
 
Question 40
 
Which of the following is a key difference between the Started Service and Bound Service?
 
The Bound Service offers an interface of the client/service, which allows advanced two-way communication between the client and service.
 
The Bound Service works only as long as a client is connected to it, whereas the Started Service can work indefinitely.
 
The Bound Service runs on demand, while the Started Service is pre-started when the system boots.
 
The Bound Service always works in its client process, while the Started Service always runs in a separate process.
 
Question 41
 
Which of the following best describes the purpose of the onStartCommand() method?
 
It is used to notify the service that the service is to be removed, and therefore must release allocated resources.
 
It is invoked by the framework Android Service, when the Started Service is first started.
 
It is called whenever the Started Service receives an Intent from the client by calling the startService().
 
It is often used in conjunction with a model of parallel computation adapted to perform service processing.
 
Question 42
 
Which of the following is the reason that the method stopSelf() receives the parameter startId?
 
To enable the service shut down and avoid working in the background and consumption of system resources indefinitely.
 
To ensure that all resources allocated by the onCreate() method are released in the onDestroy() method.
 
To eliminate the need to explicitly obtain and release the lock in the critical sections.
 
To avoid the premature termination of the service work, when it still handles simultaneous Intent requests.
 
Question 43
 
Which of the following is the IPC mechanism supported by Android to the interaction of the service with the Actiivty?
 
Use the AIDL callback object that is passed from the activity to the service.
 
Send Intent command through the method startService().
 
Send Intent command through the method bindService().
 
Use Messenger object that is passed from the activity to the service.
 
Question 44
 
Which of the following is the reason that the Handler can not be used for direct connection between the activity and service?
 
Handlers can not be referred to as "extras" in the Intent.
 
Handlers implement the pattern Command Processor, which operates only within one process.
 
The handler cannot be used for communication between the different threads.
 
If the user has access to a resource on the platform, all applications that the user runs have access to this resource.
 
Handlers do not implement the interface Parcelable.
 
Question 45
 
What POSA patterns are associated with the use of the Android Intent, Started Service, and Messenger?
 
Half-Sync/Half-Async
 
Activator
 
Active Object
 
Command Processor
 
Question 46
 
Which of the following means the return of the value ​​START_NOT_STICKY by the onStartCommand() method?
 
Service must be stopped, till it will be started by any client code directly.
 
Restarting the service through the onStartCommand(), but do not pass an intent (pass NULL).
 
Restarting the service through the onStartCommand(), passing the same intent.
 
Stop the service and return an error code to the component that called it.
 
Question 47
 
Which of the following is a way to stop a Started Service?
 
It can call the stopSelf() to close itself.
 
Another component can close the service by calling the stopService().
 
The service will be automatically stopped when all clients unbind to it.
 
The Service will turn off automatically when no longer Intents for processing.
 
Question 48
 
Which of the following describes the purpose of the Android IntentService?
 
It provides a framework to execute remote method calls asynchronously and synchronously.
 
It provides a framework that offers the client-service interface that enables enhanced two-way communication between one or more clients and service.
 
It provides a generalization of the framework HaMeR, which encapsulates Handler implemented in the service, and allows the activity to send messages to the Handler.
 
It provides a framework for programming Started Services, which simultaneously processes the commands expressed in the form of intents.
 
Question 49
 
Which of the following is a key difference between the IntentService and usual service?
 
IntentService stops itself automatically when no more Intents for treatment, while the normal service should stop itself manually.
 
Normal service handles intents, which are sent by the client, in a background thread, while the IntentService handles requests in the UI thread.
 
The IntentService processes intents, which are sent by the client, in a background thread, while usual service handles requests in the UI thread.
 
Normal service automatically stops itself when there are no Intents to process, while the IntentService must stop itself manually.
 
Question 50
 
Which of the following is the reason for the deployment of the service in a different process than the process of its client?
 
To enable the service to be shared by multiple applications.
 
It optimizes the interaction between the client and service.
 
It allows the service to call the Java Native Interface (JNI) methods.
 
It can make the application more stable to the failure of the service.
 
Test 2
 
Question 1
 
Which of the following patterns is implemented by the framework Android IntentService?
 
Broker
 
Activator
 
Command Processor
 
Active Object
 
Question 2
 
Which of the following statements describes the mechanism of the interaction of the Android Messenger?
 
The Messenger can be used only for communication with the Bound Service.
 
The Messenger is a generalization of the framework Android AsyncTask.
 
The Messenger can be used for communication with the Started Service and Bound Service.
 
The Messenger is a generalization of the framework Android HaMeR.
 
Question 3
 
Which of the following defines the Bound Service?
 
It works only as long as at least one client is connected to it and automatically destroyed when all clients unbound to it.
 
It offers a client/server interface that allows you to extend two-way communication between one or more clients and service.
 
It performs a single operation on behalf of a client who started it and often do not return a response to the client.
 
It allows applications to perform background operations and publish the results in the UI thread, not manipulating threads and/or handlers.
 
Question 4
 
Which of the following methods inherited from the Service must be overridden to create a Bound Service?
 
onUnbind()
 
onStartCommand()
 
onCreate()
 
onBind()
 
Question 5
 
Which of the following is the way a Bound Service may interact with the client?
 
Interactions can use the framework Android HaMeR directly.
 
Interactions can be shared and message-oriented.
 
Interactions can directly use the mechanisms of the IPC Android Linux.
 
Interactions can be type specific and method-oriented.
 
Question 6
 
Which of the following is the motivation for the framework AIDL Binder?
 
To facilitate the complexity of manually writing error-prone code of marshaling/demarshaling.
 
It allows clients to call methods defined by objects that are in a different process.
 
It allows a client in a thread to send a message to the handler on another thread without manipulating a specific model of parallel computing.
 
It allows a client in one process to send a message to the service in another process without manipulating a specific model of parallel computation.
 
Question 7
 
What are the patterns used by the framework AIDL Binder?
 
Broker
 
Leader/Followers
 
Publisher/Subscriber
 
Proxy
 
Question 8
 
Which of the following is a benefit of using bilateral asynchronous calls between the Activity and Bound Service through the framework AIDL Binder?
 
Optimize the amount of data exchanged between the client and service.
 
It simplifies the model of client programming.
 
It avoids the problems associated with the blocking of the client thread during a bilateral synchronous method call.
 
It allows the Bound Service to process the received data in the thread pool.
 
Question 9
 
What is the component of the protocol?
 
Synchronization
 
URL address
 
Methods of the request
 
Semantics
 
Syntax
 
Question 10
 
What is HTTP?
 
The communication protocol, which is based on the peer to peer model.
 
The communication protocol, which is commonly used in web browsers.
 
The communication protocol that has been specifically designed to connect mobile devices to the cloud.
 
The communication protocol that is based on a client/server model.
 
Question 11
 
What are some of the reasons that HTTP is typically used to connect mobile devices to the cloud?
 
It is the most energy-efficient protocol.
 
It is controlled by requests from the server.
 
This is the most space-efficient protocol.
 
There are significant investments and infrastructure for the HTTP communication.
 
Question 12
 
What are the methods of HTTP request?
 
The mechanisms that allow the only client to send metadata on the server.
 
The mechanisms that determine exactly what type of content the server may return to the client.
 
Alternative communication protocols for HTTP, which the client can use to communicate with the server.
 
An indication of actions that the client would like the server has applied to the resource.
 
Question 13
 
Which of the following is a possible component of the HTTP request?
 
The body of the request.
 
Headers.
 
Content-Type for the body.
 
The query string.
 
All of the above.
 
Question 14
 
What is URL encoding?
 
Alternative representation of certain characters that can be placed in the URL.
 
Alternative naming schema for resources that can be chosen by the client.
 
Encoding mechanism intended to make it possible to transfer large files over the parameters of the URL request.
 
Encoding mechanism which improves the security of data transmitted in the URL.
 
Question 15
 
What is the aim of the numerical code included in the status bar of an HTTP response?
 
To provide an indication of how many titles included in the response.
 
To provide an indication of how many different types of content included in the response body.
 
To provide an indication of how great a response.
 
To provide an indication of what happened when the server processed the request.
 
Question 16
 
Which of the following statements is true about HTTP polling?
 
The dynamic adaptation of the polling interval is one approach to reducing unnecessary HTTP requests.
 
The polling can generate excessive load on the server if the polling interval is too short.
 
Because a client does not have direct access to the server state, the client can waste resources by polling the server for updates when they are not.
 
All of the above.
 
Question 17
 
Which of the following is true about Push messages?
 
The polling should never be combined with Push messages.
 
If the state, which must be sent to the client, is extremely sensitive, the model "push to poll", where the server sends a Push notification and then the client queries to update the state, is the most appropriate.
 
Push messages are based on continuous communication between the mobile device and servers of the Push message system.
 
If a state that must be sent to the client is extremely large (for example, several megabytes), the model "push to poll", where the server sends the Push notification and then the client queries to update the state, is the most suitable.
 
Question 18
 
Which of the following is true about JSON?
 
JSON is more efficient in size than XML.
 
JSON is a text format.
 
JSON may be used to represent the array of objects.
 
JSON is less effective in size than XML.
 
Question 19
 
Which of the following is true about Java annotations?
 
They cannot be applied to variables-members.
 
They can be used to provide the metadata for the methods and other Java structures.
 
They cannot be applied to the interface.
 
They cannot be applied to the class.
 
Question 20
 
Which of the following statements are true about the library Retrofit?
 
It can be used only to send primitive types as parameters to the HTTP request.
 
It can automatically do marshaling of Java objects in the body of the HTTP request.
 
It supports only the transfer of data through the request body.
 
It can be used to provide strong typing to interact with HTTP cloud services.
 
Question 21
 
Which of the following statements is correct about the REST?
 
REST defines methods to add security to requests by encoding of tokens in the HTTP headers.
 
REST defines JSON mapping to the request parameters.
 
REST provides a set of annotations to assist in the marshaling of data in HTTP requests.
 
REST requires that all data is transmitted via a POST request.
 
None of the above.
 
All of the above.
 
Question 22
 
Which of the following statements is true about HTTP polling?
 
The polling creates a situation where the data from the client and the server may not be synchronized.
 
The polling is the only option for the client to receive updates regarding the status of data on the server.
 
The polling can be ineffective if the data on the server does not change frequently and the client queries often.
 
The polling can be effective (in terms of overhead) if the data on the server change continuously and the client polls infrequently.
 
Question 23
 
Which of the following statements is true about the marshaling data from JSON to Java objects?
 
It requires the use of XML.
 
It may be automated using libraries such as Jackson.
 
It is not commonly used.
 
It is possible only on the server side.
 
Question 24
 
Which of the following is the motivation for the ContentProvider in Android apps?
 
To enable applications to exchange data with other applications.
 
To ensure a common means of access to a repository of structured data.
 
To optimize an access to private application data.
 
To facilitate the use of the Sync Adapters and Content Observers.
 
In order to separate storage from access to the data.
 
To ensure a thread-safe access to a structured storage of the application.
 
Question 25
 
What is the purpose of the header Content-Type?
 
It specifies the data format to the client as defined in one or more headers of the response.
 
It is specified for the client when a resource has moved.
 
It specifies to the server the format of data defined in the parameters of the URL request.
 
It specifies for the client or server the format of data included in the body of the request or response.
 
Question 26
 
Which of the following is a possible result of the request, which the server may define with a response code 2XX?
 
The request has been processed successfully.
 
The client sent a bad request.
 
The server found an internal error.
 
The server can not find the requested resource.
 
Question 27
 
Which of the following is true about the cookies?
 
They are small pieces of data that the client specifies and that should be stored in the server database.
 
They consist of several parts of gigabytes of data that the server indicates and that should be included in future requests by a client.
 
They are small pieces of data that the server indicates and that should be included in future requests by a client.
 
They have a special request method that should be used to send it.
 
Question 28
 
Which of the following is the reason that Android separates Content Resolvers from Content Providers?
 
It allows the implementation of the Content Provider located in a different address space than the application that accesses it via a Content Resolver.
 
It allows the implementation of the Content Provider to be activated on demand when accessing through a ContentResolver.
 
To ensure that access to the Content Provider state is automatically synchronized to prevent the race condition.
 
To optimize performance by removing extra levels of the indirection in the call chain of the execution.
 
Question 29
 
Which of the following design patterns is applied to the Content Resolvers and Content Providers in Android?
 
Observer
 
Chain of Responsibility
 
Visitor
 
Abstract Factory
 
Activator
 
Proxy
 
Question 30
 
Which of the following is true about servlets?
 
A servlet has methods DoXXXX for each type of headers that can be sent to the server.
 
A servlet has methods DoXXXX for each resource, which can be referenced in the query.
 
A servlet has methods DoXXXX for each type of content that can be sent to the server.
 
A servlet has methods DoXXXX for each method of a request that can be sent to the server.
 
Question 31
 
Which of the following statements is true about the processing of input data of the client in the servlet?
 
The servlet can access the parameters of the URL request sent by the client.
 
The servlet should not check that the types of values ​​that are sent to it by the client are correct, as the mobile client will always check it.
 
A servlet can access the URL encoded parameters contained in the body of the request sent by the client.
 
A servlet for the mobile cloud service should not check that the values ​​sent to it from the client are correct, because the mobile client will always be written by the same developer.
 
Question 32
 
Which of the following statements is true with regard to the routing of the request and the servlet?
 
The web.xml file can be used to determine which requests should be directed to what servlets.
 
The web.xml file is never used to route requests to servlets.
 
All requests should be directed to the same servlet.
 
Requests can be directed to different servlets, based on the path of the resources specified in the request.
 
Question 33
 
Which of the following can lead to an attack with penetration?
 
Repeating executable data provided by the client back to the client without filtering.
 
A failed test that the type of data sent to the server is the one that is expected.
 
Enable a client-supplied data to control by performing with involving confidential data.
 
Storage of data provided by the client without filtering and then re-send it to other clients.
 
All of the above.
 
Question 34
 
Which of the following statements is true with regard to the data provided by the client?
 
Careful filtering of client data is not required if only one type of client is expected to use a cloud service.
 
Careful filtering of client data is not needed if the same developer writes the mobile client and cloud service.
 
Since it is difficult to filter client data, the cloud service should never take the body in the HTTP request.
 
Data provided by the client in the URL request parameters are always safer than the same data in the body of the URL encoded request.
 
None of the above.
 
Question 35
 
Which of the following is an advantage of using the mechanism AsyncQueryHandler to access the Android Content Provider?
 
It is easier to program than the synchronous mechanisms for access to the Content Provider.
 
It uses an inherited parallelism effectively.
 
It does not take the additional overhead of parallel computing.
 
It does not block the UI thread.
 
Question 36
 
What are the main differences between the mechanisms AsyncQueryHandler and LoaderManager to access the Android Content Provider?
 
AsyncQueryHandler is a more general mechanism for performing CRUD operations for the Content Provider.
 
LoaderManager is a more general mechanism to perform time-consuming operations in conjunction with the lifecycle of the activity or fragment.
 
AsyncQueryHandler requires that the application directly creates a background thread to perform CRUD operations.
 
LoaderManager enables CRUD operations for the Android Content Provider to be performed in a background thread.
 
Question 37
 
Which of the following statements is true regarding the Spring DispatcherServlet?
 
It can call a variety of methods of the Controller object depending on the request path.
 
This class is designed to manage information on the configuration and to direct the information to appropriate @Autowired members-variables.
 
It can not be used in the container for web applications.
 
It is used to route requests for Spring Controller objects.
 
Question 38
 
Which of the following is the use of the annotation @RequestBody?
 
To specify for the Spring, that the body of the incoming HTTP request should be demarshaling to provide a value ​​for the parameter of the method annotated with @RequestMapping.
 
To indicate that the Spring should remove the "body" of the header from the incoming HTTP request and use it to determine the content type of the response.
 
To indicate that the Spring Controller must keep the body of the incoming HTTP request in the database.
 
To indicate that the Spring Controller has to update its current routing information using information in the body of the incoming HTTP request.
 
Question 39
 
The @RequestParam can not be used if the HTTP request contains several parts of the body.
 
Yes
 
No
 
Question 40
 
Which of the following is true about the @ResponseBody?
 
The @ResponseBody can be used to specify the parameters of the Controller method, which should not be included in the HTTP response sent to the client.
 
The @ResponseBody indicates that the return value from the Controller method should be used to create a body of the HTTP response.
 
The @ResponseBody helps to separate the Controller method logic from specific details of the HTTP protocol.
 
The @ResponseBody is mainly used for push-notification and is not related to HTTP.
 
Question 41
 
Which of the following is true about the class Spring Application?
 
It can provide a method main() to launch the Spring.
 
It does not have to inherit from a Spring specific super class.
 
With the Spring Boot and related annotations, it can be used to set the Dispatcher servlet.
 
It can be used to provide configuration information for the Spring.
 
All of the above.
 
Question 42
 
Which of the following is a reason to use the Dependency Injection?
 
To reduce the amount of manually written code of the configuration needed to connect an application together.
 
To help separate the one or more classes from its dependencies.
 
To improve performance when the application starts.
 
To enhance the security of the application.
 
Question 43
 
Why is @Autowired used?
 
To specify that one or more of the class dependencies should be automatically provided via the Dependency Injection.
 
To indicate that a particular class implements an interface that will be used for the Dependency Injection.
 
To specify that an automatic Wire format should be used for routing the HTTP request.
 
To specify that a member-variable is not thread-safe and should have a lock.
 
Question 44
 
Which of the following is true about the ORM?
 
Object relational mapping is used to help in keeping Java objects in the database.
 
Object relational mapping is used to store HTTP requests in the journal as relational objects.
 
Object relational mapping always uses JSON as the format of the state persistence.
 
Object relational mapping requires a column for each instance of the object that will be stored in the database.
 
Question 45
 
Which of the following statements is true about the code:
 
@RequestMapping("/some/path")
 
public @ResponseBody List<Video> findVideos(@RequestParam("title") String videoTitle){
 
String query = "select * from video where video.title = '"+videoTitle+"'";
 
return executeDatabaseQuery(query)
 
}
 
The only risk with this code, it will produce poor performance due to excessive manipulation of strings.
 
An arbitrary logic can potentially be brought in the query.
 
@RequestParam will filter the parameter title and the code is safe.
 
@RequestParam will not filter the parameter title and the code can suffer from SQL injection attacks.
 
Question 46
 
Which of the following is true about the Spring JPA Repositories?
 
They are used to provide a low-level procedural interface for accessing the rows and columns in the database.
 
Implementations of storage interfaces are automatically created by the Spring.
 
They can only store Java objects, which implement the Serializable.
 
They are the interfaces that must be implemented in each class that wants to use the repository.
 
Question 47
 
Which of the following is true about the traditional OS accounts?
 
All applications have separate user accounts associated with it.
 
If the user has access to a resource on the platform, all applications that the user runs have access to this resource.
 
By default, when a user launches an application, the application process is associated with this user account.
 
If the user has access to a resource on the platform, all applications have access to this resource.
 
By default, when a user launches an application, the application process is not associated with an account of the user.
 
Question 48
 
Which of the following is true about the Android?
 
If the user has access to a resource on the platform, all applications have access to this resource.
 
If the user has access to a resource on the platform, all applications that the user runs have access to this resource.
 
If the user runs the application, the application process is associated with a separate account for this application.
 
If the user runs the application, the application process is associated with this user account.
 
The application has access to all resources on the device associated with its user account.
 
Question 49
 
Which of the following is true about the Internet permission on Android?
 
There is a Linux-user that provides the Internet permission.
 
There is a group of Linux users that provides the Internet permission.
 
There are several groups of Linux users that provide the Internet permission.
 
Only Root-user can have the Internet permission.
 
Question 50
 
If applications are similar to humans, which of the following is similar to malicious attacks?
 
People are manipulated by others.
 
People forget things.
 
People lie to each other.
 
People steal from other people.
 
Test answers
 
Test 1
 
Question 1
 
Answer: Visibility.
 
The opacity (transparency).
 
Position.
 
Question 2
 
Answer: No
 
Question 3
 
Answer: The adapter manages a set of data for the AdapterView.
 
Adapters can notify the AdapterView when data of the adapter changed.
 
Question 4
 
Answer: View2 takes 3/5 the width of the LL.
 
Question 5
 
Answer: onCreateContextMenu().
 
Question 6
 
Answer: show()
 
Question 7
 
Answer: When the action button can not fit in or should not be placed on the action bar, it is displayed in a separate window that is accessible at the touch of an overflow icon.
 
Question 8
 
Answer: To improve performance on multi-core platforms.
 
To improve the application response.
 
To simplify the structure of the program with respect to event-driven programming.
 
Question 9
 
Answer: The Android "Handler Messages and Runnables" (HaMeR) framework allows you to run operations in one or more background threads, publishing its results in the UI thread.
 
The Android AsyncTask framework allows you to run operations in one or more background threads and publish the results in the UI thread, without manipulation the thread or handler.
 
Question 10
 
Answer: Runtime stack
 
Program counter
 
Question 11
 
Answer: Implement the Runnable interface, override its run() method, pass the Runnable object to the constructor of the new object Thread, and call the start() method of the object Thread.
 
Extend the Thread class, override its run() method, and call the start() method of an instance of the extended class Thread.
 
Question 12
 
Answer: If a user code in the Java Thread calls the wait(), join(), or sleep(), these methods check the InterruptedException.
 
Question 13
 
Answer: When Android Linux scheduler selects a thread to execute it, the thread goes to the Runnable state.
 
Question 14
 
Answer: Classes in the HaMeR are loosely coupled, while classes in the AsyncTask are closely related.
 
You can use the framework AsyncTask without manipulating threads, handlers, messages, or Runnable objects explicitly.
 
Question 15
 
Answer: It increases productivity by combining communications and computing on multicore platforms.
 
It protects developers from the tedious and error-prone aspects of the design constraints of the Android platform.
 
Question 16
 
Answer: Thread-Specific Storage
 
Question 17
 
Answer: Template Method
 
Question 18
 
Answer: Interact with the Looper to serialize message processing in the thread, with which it is associated.
 
Send Message objects and/or publish Runnable objects in the Looper in the handler thread.
 
Question 19
 
Answer: Command Processor
 
Active Object
 
Question 20
 
Answer: It allows the Runnable be processed at a later time in the same thread as the client that placed the Runnable.
 
It allows the Runnable to be handled in a different thread than the client that placed the Runnable.
 
Question 21
 
Answer: The Handler should be expanded and its handleMessage() method should be overridden for the processing of the received messages.
 
Question 22
 
Answer: The AsyncTask framework does not require application developers to manipulate directly threads, handlers, messages, and Runnable objects.
 
The tight integration of classes in the framework AsyncTask facilitates their use by reducing the "surface area" of the API, which the framework provides to applications.
 
Question 23
 
Answer: It allows its methods work in different control threads.
 
Question 24
 
Answer: Java Executor
 
Android HaMeR
 
Question 25
 
Answer: A Java ThreadPoolExecutor instance is used to execute each AsyncTask object.
 
The Android HaMeR framework is used within the framework AsyncTask to send messages from a background thread to the UI thread.
 
The single background thread in each process starts all doInBackground() methods of the AsyncTasks.
 
Question 26
 
Answer: Performing AsyncTasks.
 
Placing and processing a Runnable.
 
Sending and processing of messages.
 
Question 27
 
Answer: It is easy to use for both simple and complex applications that use parallel computing.
 
It provides a relatively transparent scalability through its use of the Java Thread Pool Executor.
 
Question 28
 
Answer: Background threads in the AsyncTask implicitly interact with the UI thread.
 
Background threads in the HaMeR directly interact with the UI thread.
 
Question 29
 
Answer: Template Method
 
Strategy
 
Factory Method
 
Question 30
 
Answer: Command Processor
 
Half-Sync / Half-Async
 
Thread-Specific Storage
 
Question 31
 
Answer: The Active Object is used in the Java ExecutorService.
 
The Command Processor is used in the HaMeR.
 
The Factory Method is used in the AsyncTask.
 
Question 32
 
Answer: It reduces the overhead of sync to access the object.
 
Question 33
 
Answer: The class Android Looper.
 
The standard C errno macro.
 
Question 34
 
Answer: Pack a functionality of the application and its parameterization in an object to make it suitable for use in a different context.
 
Question 35
 
Answer: Support for bilateral operations requires additional programming efforts.
 
Functionality is controlled by the sender, but not the recipient.
 
Question 36
 
Answer: When the object's methods may be blocked for a long time during their execution.
 
When the object interface methods must define its borders of parallel computation.
 
When multiple requests of the client method can work simultaneously on the object.
 
Question 37
 
Answer: Java ExecutorService Framework.
 
Android HaMeR Framework.
 
Question 38
 
Answer: Separate short-term operations from the long-running operations in programs with parallel computing.
 
Simplify programming of parallel computing without excessive loss of productivity.
 
Question 39
 
Answer: Service is a component of an application that can perform time-consuming operations in the background and has not a user interface.
 
Question 40
 
Answer: The Bound Service offers an interface of the client/service, which allows advanced two-way communication between the client and service.
 
The Bound Service works only as long as a client is connected to it, whereas the Started Service can work indefinitely.
 
Question 41
 
Answer: It is called whenever the Started Service receives an Intent from the client by calling the startService().
 
It is often used in conjunction with a model of parallel computation adapted to perform service processing.
 
Question 42
 
Answer: To avoid the premature termination of the service work, when it still handles simultaneous Intent requests.
 
Question 43
 
Answer: Use the AIDL callback object that is passed from the activity to the service.
 
Use Messenger object that is passed from the activity to the service.
 
Question 44
 
Answer: Handlers can not be referred to as "extras" in the Intent.
 
Handlers do not implement the interface Parcelable.
 
Question 45
 
Answer: Activator
 
Active Object
 
Command Processor
 
Question 46
 
Answer: Service must be stopped, till it will be started by any client code directly.
 
Question 47
 
Answer: It can call the stopSelf() to close itself.
 
Another component can close the service by calling the stopService().
 
Question 48
 
Answer: It provides a framework for programming Started Services, which simultaneously processes the commands expressed in the form of intents.
 
Question 49
 
Answer: IntentService stops itself automatically when no more Intents for treatment, while the normal service should stop itself manually.
 
The IntentService processes intents, which are sent by the client, in a background thread, while usual service handles requests in the UI thread.
 
Question 50
 
Answer: To enable the service to be shared by multiple applications.
 
It can make the application more stable to the failure of the service.
 
Test 2
 
Question 1
 
Answer: Activator
 
Command Processor
 
Active Object
 
Question 2
 
Answer: The Messenger can be used for communication with the Started Service and Bound Service.
 
The Messenger is a generalization of the framework Android HaMeR.
 
Question 3
 
Answer: It works only as long as at least one client is connected to it and automatically destroyed when all clients unbound to it.
 
It offers a client/server interface that allows you to extend two-way communication between one or more clients and service.
 
Question 4
 
Answer: onBind()
 
Question 5
 
Answer: Interactions can be shared and message-oriented.
 
Interactions can be type specific and method-oriented.
 
Question 6
 
Answer: To facilitate the complexity of manually writing error-prone code of marshaling/demarshaling.
 
It allows clients to call methods defined by objects that are in a different process.
 
Question 7
 
Answer: Broker
 
Proxy
 
Question 8
 
Answer: It avoids the problems associated with the blocking of the client thread during a bilateral synchronous method call.
 
Question 9
 
Answer: Synchronization
 
Semantics
 
Syntax
 
Question 10
 
Answer: The communication protocol, which is commonly used in web browsers.
 
The communication protocol that is based on a client/server model.
 
Question 11
 
Answer: There are significant investments and infrastructure for the HTTP communication.
 
Question 12
 
Answer: An indication of actions that the client would like the server has applied to the resource.
 
Question 13
 
Answer: All of the above.
 
Question 14
 
Answer: Alternative representation of certain characters that can be placed in the URL.
 
Question 15
 
Answer: To provide an indication of what happened when the server processed the request.
 
Question 16
 
Answer: All of the above.
 
Question 17
 
Answer: If the state, which must be sent to the client, is extremely sensitive, the model "push to poll", where the server sends a Push notification and then the client queries to update the state, is the most appropriate.
 
Push messages are based on continuous communication between the mobile device and servers of the Push message system.
 
If a state that must be sent to the client is extremely large (for example, several megabytes), the model "push to poll", where the server sends the Push notification and then the client queries to update the state, is the most suitable.
 
Question 18
 
Answer: JSON is more efficient in size than XML.
 
JSON is a text format.
 
JSON may be used to represent the array of objects.
 
Question 19
 
Answer. They can be used to provide the metadata for the methods and other Java structures.
 
Question 20
 
Answer: It can automatically do marshaling of Java objects in the body of the HTTP request.
 
It can be used to provide strong typing to interact with HTTP cloud services.
 
Question 21
 
Answer: None of the above.
 
Question 22
 
Answer: The polling creates a situation where the data from the client and the server may not be synchronized.
 
The polling can be ineffective if the data on the server does not change frequently and the client queries often.
 
The polling can be effective (in terms of overhead) if the data on the server change continuously and the client polls infrequently.
 
Question 23
 
Answer: It may be automated using libraries such as Jackson.
 
Question 24
 
Answer: To enable applications to exchange data with other applications.
 
To ensure a common means of access to a repository of structured data.
 
To facilitate the use of the Sync Adapters and Content Observers.
 
In order to separate storage from access to the data.
 
Question 25
 
Answer: It specifies for the client or server the format of data included in the body of the request or response.
 
Question 26
 
Answer: The request has been processed successfully.
 
Question 27
 
Answer: They are small pieces of data that the server indicates and that should be included in future requests by a client.
 
Question 28
 
Answer: It allows the implementation of the Content Provider located in a different address space than the application that accesses it via a Content Resolver.
 
It allows the implementation of the Content Provider to be activated on demand when accessing through a ContentResolver.
 
Question 29
 
Answer: Observer
 
Activator
 
Proxy
 
Question 30
 
Answer: A servlet has methods DoXXXX for each method of a request that can be sent to the server.
 
Question 31
 
Answer: The servlet can access the parameters of the URL request sent by the client.
 
A servlet can access the URL encoded parameters contained in the body of the request sent by the client.
 
Question 32
 
Answer: The web.xml file can be used to determine which requests should be directed to what servlets.
 
Requests can be directed to different servlets, based on the path of the resources specified in the request.
 
Question 33
 
Answer: All of the above.
 
Question 34
 
Answer: None of the above.
 
Question 35
 
Answer: It uses an inherited parallelism effectively.
 
It does not block the UI thread.
 
Question 36
 
Answer: AsyncQueryHandler is a more general mechanism for performing CRUD operations for the Content Provider.
 
LoaderManager is a more general mechanism to perform time-consuming operations in conjunction with the lifecycle of the activity or fragment.
 
Question 37
 
Answer: It can call a variety of methods of the Controller object depending on the request path.
 
It is used to route requests for Spring Controller objects.
 
Question 38
 
Answer: To specify for the Spring, that the body of the incoming HTTP request should be demarshaling to provide a value ​​for the parameter of the method annotated with @RequestMapping.
 
Question 39
 
Answer: No
 
Question 40
 
Answer: The @ResponseBody indicates that the return value from the Controller method should be used to create a body of the HTTP response.
 
The @ResponseBody helps to separate the Controller method logic from specific details of the HTTP protocol.
 
Question 41
 
Answer: All of the above.
 
Question 42
 
Answer: To reduce the amount of manually written code of the configuration needed to connect an application together.
 
To help separate the one or more classes from its dependencies.
 
Question 43
 
Answer: To specify that one or more of the class dependencies should be automatically provided via the Dependency Injection.
 
Question 44
 
Answer: Object relational mapping is used to help in keeping Java objects in the database.
 
Question 45
 
Answer: An arbitrary logic can potentially be brought in the query.
 
@RequestParam will not filter the parameter title and the code can suffer from SQL injection attacks.
 
Question 46
 
Answer: Implementations of storage interfaces are automatically created by the Spring.
 
Question 47
 
Answer: If you have access to a resource on the platform, all applications that the user runs, have access to this resource.
 
By default, when a user launches an application, the application process is associated with this user account.
 
Question 48
 
Answer: If the user runs the application, the application process is associated with a separate account for this application.
 
The application has access to all resources on the device associated with its user account.
 
Question 49
 
Answer: There is a group of Linux users that provides the Internet permission.
 
Question 50
 
Answer: People are manipulated by others.
 
People lie to each other.
 
People steal from other people.
 

You can download the book Thirty exams tests of 50 questions and answers on the knowledge of Android here.

Our services

Our developments are at the forefront of high technologies

We design and develop web sites

Individual site design
Creating dynamic sites
Website layout and programming

We develop information systems

Automation of business processes for small and medium business
Collection, storage and processing of data
Using cloud technologies

We create mobile apps

Integration with a Web site
Creating mobile versions of web sites
Using Augmented Reality and Computer Vision

About us

NOV Tech Solutions specializes in developing services for operational management of business, creating web and mobile applications on order

NOV Tech Solutions is a team of highly qualified professionals working for the result

We work quickly and efficiently, using the most modern technologies

We appreciate and take care of our customers, constantly improving the service and expanding the list of services

Our partners

Contacts