nerdexam
Android

AND-401 · Question #56

Consider the following AndroidManifest.xml file: <?xml version="1.0" encoding="utf-8"?> package="com.mkyong.android" android:versionCode="1" android:versionName="1.0" > <uses-sdk…

The correct answer is C. The application won't compile. See the full explanation below for the reasoning.

Question

Consider the following AndroidManifest.xml file:

<?xml version="1.0" encoding="utf-8"?> package="com.mkyong.android" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <uses-permission android:name="android.permission.WebActivity " /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".WebViewActivity" android:theme="@android:style/Theme.NoTitleBar" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> Supposing the application connects to the internet at startup, which of the following is true?

Options

  • AThe application throws an exception indicating it does not have permission to access the URL
  • BThe application will work as intended
  • CThe application won't compile
  • DThe application throws a java.lang.SecurityException

How the community answered

(60 responses)
  • A
    2% (1)
  • B
    8% (5)
  • C
    85% (51)
  • D
    5% (3)

Community Discussion

No community discussion yet for this question.

Full AND-401 Practice