What is the most common file type of media supported for audio playback on the Android? What is the most common file type of media supported for audio playback on the Android? a. midi b. mp3 c. ogg d. wav Answer: b. mp3
What is the first GridView control in a project named by default? What is the first GridView control in a project named by default? a. control1 b. defaultGallery c. gridView1 d. theGallery Answer: c. gridView1
What is the TextView property for backgrounds? What is the TextView property for backgrounds? a. graphic b. background c. picture d. image Answer: b. background
What invokes a scheduled Timer? What invokes a scheduled Timer? a. AbstractTask b. ScheduledTask c. Task d. TimerTask Answer: d. TimerTask
What does the splash screen provide time for Android to do? What does the splash screen provide time for Android to do? a. bootstrap the phone driver b. download updates c. initialize resources for your app d. stream data from Google Answer: c. initialize resources for your app
What category of the Palette does the control GridView sit in? What category of the Palette does the control GridView sit in? a. Images category b. Composite category c. Media category d. Viewing category Answer: b. Composite category
What can be described as the series of actions from the beginning of an Activity to its end? What can be described as the series of actions from the beginning of an Activity to its end? a. life cycle b. flow chart c. run time d. execution period Answer: a. life cycle
Using controls such as the GridView and Spinner, what binds specific types of data and displays that data in a particular layout? Using controls such as the GridView and Spinner, what binds specific types of data and displays that data in a particular layout? a. adapter b. context c. editor d. view Answer: a. adapter
On an Android, what are 1000 milliseconds equivalent to in seconds? On an Android, what are 1000 milliseconds equivalent to in seconds? a. 0.1 seconds b. 1 second c. 10 seconds d. 100 seconds Answer: b. 1 second
Each of the following is a common state for the MediaPlayer class except for which one? Each of the following is a common state for the MediaPlayer class except for which one? a. continue() b. pause() c. start() d. stop() Answer: a. continue()
What is printed to the console after the code that follows is executed? What is printed to the console after the code that follows is executed? int[][] types = new int[4][]; for (int i = 0; i < types.length; i++) { types[i] = new int[i+1]; } System.out.println(types[1].length); a. "3" b. code doesn't compile c. "1" d. "4" e. "2" Answer: e. "2"
What happens when the code that follows is executed? What happens when the code that follows is executed? int[] nums = new int[4]; for (int i = 0; i <= nums.length; i++) { nums[i] = i; } System.out.println(nums[2]); a. It prints "3" to the console. b. It prints "2" to the console. c. It prints "1" to the console. d. It throws an ArrayIndexOutOfBoundsException Answer: d. It throws an ArrayIndexOutOfBoundsException
To use the binarySearch method of the Arrays class on an array of ints, you must first To use the binarySearch method of the Arrays class on an array of ints, you must first a. implement the Comparable interface b. sort the array c. override the equals method d. create an Arrays object Answer: b. sort the array
The length of the array that follows is int[] grades = new int[4]; The length of the array that follows isint[] grades = new int[4]; a. 0 b. 3 c. 5 d. 4 Answer: d. 4
The array that follows is an array of double[] grades = new double[3]; The array that follows is an array ofdouble[] grades = new double[3]; a. objects b. arrays c. grades d. doubles Answer: d. doubles
How many rows are in the array that follows? Rental[][] transactions = new Rental[7][3]; How many rows are in the array that follows?Rental[][] transactions = new Rental[7][3]; a. 7 b. 3 c. 2 d. 6 Answer: a. 7
What is the length of the bestTimes array? double[] times = {3.56, 3.9, 2.6, 4.5, 2.4, 5.2}; double[] bestTimes = new double[4]; Arrays.sort(times); bestTimes = Arrays.copyOfRange(times, 1, 4); What is the length of the bestTimes array? a. 4 b. 3 c. 6 d. 5 Answer: a. 4
An enhanced for loop can only be used An enhanced for loop can only be used a. to work with one-dimensional arrays b. to work with all the elements of an array c. to work with jagged arrays d. to work with arrays that contain integers Answer: b. to work with all the elements of an array
Which of the following is not a reason to create a package? Which of the following is not a reason to create a package? a. To group related classes b. To make finding classes easier c. To make it easy to reuse classes d. To prevent other developers from using the class Answer: d. To prevent other developers from using the class
Which of the following is a valid Javadoc comment? Which of the following is a valid Javadoc comment? a. // Calculates the balance due // b. / Calculates the balance due */ c. /* Calculates the balance due / d. / Calculates the balance due / Answer: c. /* Calculates the balance due /