Oracle Final Exam Questions

Source: Internet
Author: User
Tags message queue modifier sqlite database terminates

Select question

  1. Below is not one of the four major Android components ()

    A. Activity b.intent C. Service D. ContentProvider

  2. The following about the broadcast narrative error is ()

    A. Broadcast is one of the four components of Android

    B. Broadcastreceiver There are two ways of registering, static and dynamic registration

    C. Static registration needs to be configured in Mainfest.xml

    D. Dynamic registration requires access to the broadcast registration at the time the app exits.

  3. The following about the Broadcastreceiver error is ():

    A. There are two ways to register a. Broadcastreceiver, static registration and dynamic registration.

    B. Broadcastreceiver must be declared in the Androidmainfest file

    C. The use of broadcastreceiver, there must be a party to send a broadcast, a party listening to register the broadcast, the OnReceive method will be called.

    D. Intent sent by the broadcast are implicitly initiated.

  4. The following is about who first receives the broadcast order error ()

    A. Orderly broadcast, priority high first receive

    B. Ordered broadcast, with the priority of the static and dynamic broadcast receivers, statically precedence over the dynamics.

    C. Orderly broadcast, with the priority of the dynamic broadcast receiver, first registered greater than after registration.

    D. In general broadcast, ignoring priority, dynamic broadcast receivers take precedence over static broadcast receivers

  5. The following about the broadcast saying Wrong is ()

    A. Broadcast divided into ordered broadcasts and disordered broadcasts

    B. Use the Abortbroadcast method to interrupt the delivery of all broadcasts.

    C. Broadcast registration methods are divided into dynamic and static

    D. Sendorderbroadcast is used to broadcast ordered events to the system, and Sendbroadcast () is used to broadcast unordered events.

  6. The following remarks about the intent boot component are incorrect ()

    A.startactivity () B. StartService () C. Startbroadcastreceiver () D.startactivityforresult ()

  7. For broadcast sending, the intent is started in the form of ()

    A. Explicit startup B. Implicit startup C. A and B can all be D. The above statements are incorrect.

  8. The following statement about notification is correct ():

    A. Notificationmanager man = new Notificationmanager ();

    B. Pendingintent contentintent= New Pendingintent ();

    C. remoteviews Contentview = new Remoteviews ();

    D. Notification Notification = new Notification ();

  9. The right thing about the Contenvalues class is ()

    A, he and Hashtable more similar, is also responsible for storing some name value pairs, but he stored the name value of the

    B, he and Hashtable more similar, is also responsible for storing some name value pairs, but he stored the name value of the

    C, he and Hashtable more similar, is also responsible for storing some name value pairs, but he stored the name value of the

     名,可以为空,而值都是String类型       

    D, he and Hashtable more similar, but also responsible for storing some name value pairs, but he stored the name of the value pair is a string type, and the value is a string type

10. The database used in mobile phone development is ()

A,sqlite3 b,oracle c,sql Server d,db23

11. Using Aidl to complete the remote service method call the following statement is incorrect ()

A,aidl the corresponding interface name cannot be the same as the Aidl file name

The contents of the B,aidl file are similar to Java code

C, create a service (services) that returns the object that implements the Aidl interface in the Onbind (Intent Intent) method of the service

D,aidl the corresponding interface is not preceded by the access permission modifier

12.android in the file operation mode can only be used by the application, write to the file will overwrite is ()

A, Mode_append b,mode_world_readable

C,mode_world_writeable D, Mode_private

13. The wrong thing about playing video in Android is ()

A, you can use the Surfaceview component to broadcast video B, you can use the Videoview component to broadcast video

The C,videoview component can control the playback position and size D,videoview the format of the video playback can be 3gp

14. The following about how to use the notification, the wrong is ()

A,notification need Notificatinmanager to manage

B, display notification message using Notificationmanager's Notify method

C, when the display notification can set the notification when the default sound, vibration, etc.

D, call the method in the notification object to clear the message

    1. The following methods that are not part of the service life cycle are ()

A,oncreate B,ondestroy c,onstop D,onstart

    1. The following statements in the sharedpreferences of saving and fetching files are incorrect: ()

A, belongs to the mobile storage solution b,sharepreferences processing is Key-value

C, the path to the read XML file is/sdcard/shared_prefs/d, and the data is saved in the format XML

17.SharedPreferences stored data type not supported ()

A. Boolean b.int C. String D. Double

18. The following JSON statement is wrong: ()

A. json is a form of data interaction.

B. There are two types of data formats for JSON: {} and []

C. JSON data with {} for objects in Java, [] represents a list object in Java

d.{"1": "123", "2": "234", "3": "345"} is not JSON data

19. The following SQL statement is incorrect ()

A. Select * FROM user b.update user set username= ' Zhangsan ' where id= ' 2 '

C. Delete * from user D.insert to user values (1, ' Zhang ', ' Pass ');

20. For sharedpreferences the following is correct ()

A. sharedpreferences pref = new Sharedpreferences ();

B. Editor editor = new editor ();

C. Sharedpreferences object for reading and storing common data types

D. The Editor object stores the data at the end of the call to the commit () method.

21. When reading shared storage data in multiple applications, the query method to use, which object's method ()
A. contentresolver B. contentprovider

C. Cursor D. Sqlitehelper

How to implement change activity interface element () in 22.Service.
A. Passing the current Activity object to the service object

B. By sending a broadcast to activity
C. Changing activity interface elements through a context object
D. You can invoke the activity's method implementation to change the interface element in the service

23. When using the Sqliteopenhelper class, which of its methods is used to implement version upgrades? ()

A. onCreate () B. onupgrading () c. onUpdate () D. Onupgrade ()

Which method do I need to call to complete the preparation before 24.MediaPlayer plays the resource? ()

A. Setdatasource () B. Prepare () c. Reset () D. Release ()

25. When using Sqliteopenhelper this helper class in Android, get ()

A. getdatabase () B. OpenDatabase ()

C. getreadabledatabase () D. Getabledatabase ()

26. What is the correct statement about the service life cycle? ( )

A. If the service is already started, the OnCreate () and OnStart () methods will be called successively

B. The OnCreate () and OnStart () methods are called when the first boot

C. The OnCreate () method is only called when the first boot

D. If the service does not start, you cannot call StopService to stop the services.

    1. When using MediaPlayer to play a mp3 file saved on SDcard, ()?

A. You need to create A MediaPlayer using the Mediaplayer.create method

B. Direct New MediaPlayer

C. Need to call the Setdatasource method to set the file source

D. Call the Start method directly without setting the file source

28. Using Aidl to complete the remote service method call the following statement is incorrect? ()

A. Aidl corresponding interface name cannot be the same as Aidl file name

B. The contents of the Aidl file are similar to Java code

C. Create a service that returns an object that implements the Aidl interface in the Onbind (Intent Intent) method of the services

D. Aidl the corresponding interface is not preceded by the access permission modifier

    1. On the role of broadcasting, the correct argument is ()

A. It is a message that is released with the receiving system.

B. It can help the service modify the user interface

C. It is not possible to start a Service

D. It can initiate an Activity

    1. About the Sqlite database, the incorrect argument is () to choose one:

A. The Sqliteopenhelper class is primarily used to create databases and update databases

B. The Sqlitedatabase class is used to manipulate the database

C. The OnCreate method of Sqliteopenhelper is executed each time the Getwritabledatabase () method of the sqlitedatabase is called.

D. The database structure can be updated automatically when the database version changes

31. Which of the following options are not activity-initiated methods ()

A, gotoactivity B, startactivity

C, Startactivityfromchild D, Startactivityforresult

32. Which of the following options is the method of sending the broadcast ()

A. startbroadcast B. startbroadcastreceiver

C. Sendbroadcast D.sendbroadcastreceiver

    1. Sharedpreferences the path and extension of the saved file? ()

A,/data/data/shared_prefs/*.txt

B,/data/data/package name/shared_prefs/*.xml

C,/mnt/sdcard/Specify the name of the folder extension

D, any path specified extension

    1. What are the startup modes for activty and task? ()

A, Standard, singletop

B, Singletop, Singletask

C, Singletask, singleinstance

D, Standard, Singletop, Singletask, singleinstance

    1. For an already existing Sharedpreferences object setting, want to deposit a string "person", setting should first call what method ()

A, edit () B, Save () C, commit () D, putstring ()

    1. by StartService () and Bindservice (), the following statement is wrong ()

A. Start the service via StartService (): The following lifecycle method is invoked: OnCreate ()---->onstart ()---->ondestory ()

B, when using the StartService () method to start the service, the visitor and the service is not bound together, the visitor exits, the service is still running

C, if the call Bindservice () starts the service: The following lifecycle method is called: onCreate ()---->onbind---->ondestory ()---->onunbind ()

D, using the Bindservice () method to start the service, the visitor and the service is bound together, that is, the visitor exits, the service terminates, unbind.

37. On Android, the MediaPlayer saying Wrong is ()

A, MediaPlayer contains audio and video playback functions.

B. Get MediaPlayer instances with new MediaPlayer () and Meiaplayer.create ().

C, when we play a song due to an abnormal interruption, due to data loss, can only start from the beginning of the playback.

D, when specifying the source of the MediaPlayer data, you must specify the path, resource ID, or network path of the file being played.

38. In the JDBC Connection database programming application development, the use () can implement the connection database.

A. Connection class B. PreparedStatement class C. CallableStatement class D. Statement

39. In order to implement SQL statements that call parameters in Java programs, you should use ().

A. Connection class B. PreparedStatement class C. ResultSet class D. Statement

    1. From the HTTP request, get the request parameter, should call ()

A. getattribute () method of the Request Object B. GetParameter () method of the Request object

C. getattribute () method of the Session object D. GetParameter () method of the Session object

    1. Multi-threaded download and breakpoint continuation use what () class is the operation of the file.

A. fileinputstream B.fileoutputstream C.inputstreamreader D. randomaccessfile

    1. With regard to the operation of the SQLite3 database, the following statement is incorrect ()

A. Context object calls the Openorcreatedatabase method to open or create A database

B. Static method of the Sqlitedatabase class Openorcreatedatabase method Open or create a database

C. Context object CloseDatabase method to close the database.

D. Static methods of the Sqlitedatabase class DeleteDatabase method delete a database

    1. The following methods that are not part of the service life cycle are ()

A.oncreate B.ondestroy c.onstop D.onstartcommand

44. The trigger condition for the onserviceconnected () method of the Serviceconnection interface is described correctly when the () A.bindservice () method executes successfully.

The B.bindservice () method executes successfully and the Onbind () method returns a non-empty IBinder object.

C.service the OnCreate () method and the Onbind () method are executed successfully.

D.service the OnCreate () and Onstartcommand () methods have been successfully started.

45. When creating a connection to a database using the construction method of Sqliteopenhelper, the parameter can be set to null ()

A.context B. Database name C. cursorfactory D. Database version

46. Inheritance ContentProvider does not need to implement () and other methods.

A. Add B. Delete C. Update D. Query

47. Which of the following methods is not a way to send a broadcast message? ( )

A, Sendbroadcast () B, Sendcommonbroadcast ()

C, Sendorderedbroadcast () D, Sendstickybroadcast ()

48. The following statement about ContentProvider is wrong: ()

A, the role of ContentProvider is to achieve data sharing and exchange

B, to access the ContentProvider, only need to call ContentProvider to change the relevant methods of adding and deleting

C, the URI provided by ContentProvider must begin with "content://"

D, Android for audio and video, images, contacts in the system provides built-in ContentProvider

    1. Get the SD card music list by calling the () method to invoke the Query method

A. Getcontentprovider B.getcontentresolver C. getconnection D. GetURI

50. With regard to JSON and XML, the error is ()

A. JSON is much faster than XML

B. JSON has better descriptive data than XML

C. JSON is small in size relative to XML

D. JSON and XML also have a rich analytical approach

    1. How does the support for spell checking in input be implemented? ()

A, Broadcastreceiver B, ContentProvider C, Service D, Activity

52. Can I start those components via intent?

A, Activity B, Service C, two items can not D, both can

    1. Which of the following is not the correct flag when activity starts? ()

A, Flag_activity_clear_top B, Flag_activity_single_task

C, Flag_activity_single_top D, Flag_activity_new_task

    1. Do you need to move the process to the foreground when you encounter any of the following conditions? ( )

A, the process is running an activity that interacts with the user, and its onresume () method is called

B, the process has a running broadcastreceiver, and its onreceive () method is executing

C, the process has a service, the service corresponding to the activity is interacting with the user

D. All options are correct

    1. How do I access the Media library? ()

A, read through the direct file B through the content Provider

C, both can be D, neither can

    1. What is the role of the flag_activity_clear_top tag? ( )

A. Do nothing if activity is already started on any stack

B. Do nothing if activity is already started in the current stack

C, if activity is already started in the current stack, all activity above that activity will be destroyed

D, if activity has been started on any stack, all activity on top of that activity will be destroyed

    1. Which of the following processes is most important and ultimately destroyed? ()

A, service process B, background process C, visible process D, foreground process

    1. Sharedpreferences and preferences modification support transactions? ()

A, support, does not support B, does not support, does not support

C, not supported, support D, support, support

    1. What permissions do I need to keep the screen on while playing the video screen? ()

A, <uses-permission android:name= "Android.permission.INTERNET"/>

B, <uses-permission android:name= "Android.permission.WAKE_LOCK"/>

C, <uses-permission android:name= "Android.permission.SCREEN_LOCK"/>

D, <uses-permission android:name= "Android.permission.DIM_LOCK"/>

    1. The following statement about the broadcast is correct ().

A, broadcast receivers can only be registered in the configuration file

B, broadcast receiver can not log off after registration

C, broadcast receivers can only receive customized broadcast messages

D. Broadcast receivers can be registered and unregistered separately in activity

    1. Which of the following statements is true when large bitmap objects are used extensively? ()

A, does not crash, but requires that the bitmap object that is no longer being used is set to NULL

B, does not crash, but requires frequent calls to System.GC () to notify memory release

C, will not crash, because the virtual opportunity to automatically reclaim memory

D. May cause a system crash

    1. Which of the following is not a common method of inter-application interaction? ()

      A, receive broadcast message B, File share access

      C. Access to D, activity calls via Content resolver interface

63. Start the service via Bindservice (), what if the service has not been started? What happens to the service when the caller exits? ()

A, failure, do not terminate B, start, terminate

C, fail, terminate D, start, do not terminate

    1. Android applications in four major components, can be in the background long time when the CEO, but do not need to provide user interface is ()

      A, Service B, Activity C, Broadcastreceiver D, ContentProvider

    2. Contentresolver what method to query content provider provides ()

A, select () B, retrieve () C, query () D, execute ()

    1. What are the main usage scenarios for pendingintent? ()

A. Set actions in the widget that respond to user actions

B. Initiate an action through notification

C, at least one is incorrect

D, A and B are correct

67. What permissions do I need to use when the device vibrates in the application? ()

A, Android.hardware.permission.VIBRATE

B, Android.permission.hardware.VIBRATE

C, Android.security.VIBRATE

D, Android.permission.VIBRATE

68. The trigger condition of the onserviceconnected () method on the Serviceconnection interface is correct? ()

After successful execution of A, Bindservice () method

B, the Bindservice () method executes successfully and the Onbind () method returns a non-empty IBinder object

C, Service OnCreate () method and Onbind () method after successful execution

D, Service OnCreate () and Onstartcommand () method started successfully

69. The intent object is wrong ()

A, in Android, the intent object is used to pass the information

B, Intent objects can pass values to the broadcast or Activity

C, when using Intent, you can pass a part of the value type

D, when using the Intent value, its key value can be an object

Can 70.Notification messages be canceled? ()

A, can only cancel the application initiated message B, may be canceled by any app

C, can not be canceled, can only overwrite D, can only cancel the message originated by the application, and can only be canceled by the message ID

71. If you need to send a text message in an Android app, you need to add what permissions () in the Androidmanifest.xml file.

A, send SMS, no need to configure permissions B, permission.sms

C, Android.permission.RECEIVE_SMS D, Android.permission.SEND_SMS

72. What is wrong with the source of the video? ()

A, can originate from external URL B, can originate from internal URI, get through content resolver

C, can be derived from the resource file D, can file direct access to internal media

    1. Are additional permissions required for internal storage and external storage? ()

A, no need, no need B, need, do not need

C, need, need D, no need, need

    1. How do I access the files on the SD card? ()

A, through the direct file read B, through the content Provider

C, both can not be D, two can

75. The system may eject the ANR dialog box () in the following cases

A, in activity, the message in the main thread message queue is not responding within 5 seconds

B, in service, the Onstartcommand () method executes for more than 5 seconds

C, in Broadcastreceiver, the OnReceive () method takes more than 5 seconds to execute

D, the Run () method takes more than 5 seconds to execute in a new thread that starts

    1. by StartService () and Bindservice (), the following statement is wrong ()

A, starting the service through StartService () invokes the following life cycle method:

OnCreate ()---->onstart ()---->ondestory ()

B, when using the StartService () method to start the service, the visitor and the service is not bound together, the visitor exits, the service is still running

C, if the call Bindservice () starts the service: The following lifecycle method is called: onCreate ()---->onbind---->ondestory ()---->onunbind ()

D, using the Bindservice () method to start the service, the visitor and the service is bound together, that is, the visitor exits, the service terminates, unbind.

77. What class should I use if I want to store a key-value pair string? ()

A, Contentresolver B, sharedpreferences C, Resources D, Cookies

    1. When the system receives a request to initiate activity from intent, what is the most appropriate activity to choose? ()

A, category B, data C, action D, all can

    1. Which high-efficiency serial number interface does Android offer? ()

A, clonable B, parcelable C, copiable D, externalizable

80. Which of the following statements can construct the correct dialog box ().

A, Alertdialog Dialog = new Alertdialog (context);

B, Alertdialog.builder Builder = new Alertdialog.builder (context);

C, ProgressDialog Dialog = new ProgressDialog ();

D, Progressdialog.builder Builder = new Progressdialog.builder (context);

81. Which of the following methods is supported for video playback? ()

A, synchronous mode B. Async mode C. Both support D. Both are not supported

    1. which are interactive UI-related controls? ()

A, Activity B, Broadcastreceiver C, Service D, Content provider

    1. The method to bind the service is ()

A, Bindservice B, StartService C, OnStart D, Onbind

    1. About the activity said the law is not correct is ()

A. Activity is a visual user interface that is displayed for user action

B, an application can have a number of activity

C, activity can be accessed by an alias

D. Activity can be represented as a floating window

    1. The method that handles the menu item Click event does not contain ()

A, using onoptionsitemselected (MenuItem Item) response

B, use onmenuitemselected (int featureid. MenuItem Item) Response

C, using Onmenuitemclick (MenuItem Item) response

D. Using the Oncreateoptionsmenu (Menu menu) response

    1. What is the first method called in the Android activity life cycle? ()

A, OnInit () B, OnStart () C, OnCreate () D, Onbegin ()

    1. Intent Intent = newintent (Intent.action.view,uri.parse ("http://mail.google.com")) This sentence function states that the correct is ().

A, send email B, browse this URL in the browser C, send SMS D, other items are incorrect

    1. If you set the minimum SDK version of the app to 8, which of the following versions will not run the app? ()

A, 7 B, 8 C, 9 D, all can

    1. Which of the following is the function of the manifest file ()

A, the minimum required API level B, the level of user rights claimed by the claim

C, activity and other resources used in the recording program D. are

    1. What happens when you start a intent initialized by the following code? ()

Intent Intent = new Intent ();

Intent.addcategory (intent.category_browsable);

Intent.setaction (Intent.action_main);

A, if there are multiple browsers in the system, it will let the user choose the browser

B, if the system has more than one browser, and the default is set, the default browser will open

C, if there is only one browser in the system, the browser will open

D, All right

91. What function is called when activity is recycled due to insufficient resources? ()

A, Onsaveinstancestate () B, Onsuspend () C, Onsavestate () D, OnStop ()

92. What is the reason for the OnDestroy () method that caused an activity to be called? ()

A, the activity is paused or stopped, and its resources are recycled by the operating system

B. Activity that initiated the activity called Finishactivity ()

C, activity call Finish () D, three reasons are

What is the first method invocation order for the 93.Activity life cycle? ()

A, OnCreate (), Onresume (), OnStart ()

B, OnCreate (), Onrestart (), Onresume ()

C, OnStart (), Onresume (), OnCreate ()

D, OnCreate (), OnStart (), Onresume ()

    1. What kind of activity does the system look for after pressing the home button? ()

A, set up the activity of Action_main and Ategory_launcher

B, the activity of Action_main or Ategory_launcher is set.

C, set up the activity of Action_main

D, set up the activity of Ategory_launcher

    1. What XML file does the new activity need to be declared in the Android project? ()

A, Main.xml B, String.xml C, Androidmainifest.xml D, Layout.xml

    1. If you need to start an activity, and you can get results immediately at the end of the activity, the method is. ()

A, call Startactivityforresult ()

B. Register receiver in the activated activity to initiate broadcast messages in the activated activity

C, two options are not correct

D, two options are correct

    1. How to deliver a message to a running service ()

A, by registering receiver B, through intent C, by defining the Aidl interface D, are correct

    1. When a video or audio is playing, will the video or audio automatically hang when a call is reached? ()

A, will not B, will C. Some hand opportunities, some mobile phone will not D. All the above is wrong

    1. How to support language internationalization? ()

A, set parameters by name in the resource file, for example: ZH_CN. Title= "title"

B. Provide different strings.xml files according to different languages

C, both are incorrect D, both are correct

    1. What's wrong with intent's statement? ()

A, can be used to activate some components

B. The intention that the program wants to do STH.

C, can only be used within one component

D, the "medium" of communication between different components, specifically provides information about the components of each other calls.

Oracle Final Exam Questions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.