BCP-811 Developing Java Applications for the BlackBerry Platform

Page 1   
Question 1

Consider the code below:

What is stored in the BlackBerry devices Vector? (Choose one.)

  • A. The names of the currently paired Bluetooth devices
  • B. The names of the Bluetooth ports on the BlackBerry device
  • C. The names of all the Bluetooth devices defined on the BlackBerry device
  • D. The names of all the Bluetooth devices allowed to connect
  • E. The names of all the Bluetooth devices detected

Answer : A

Question 2

A developer needs an application that will immediately notify other BlackBerry applications
of state changes. Which API will meet this requirement? (Choose one.)

  • A. Connector
  • B. RuntimeStore
  • C. RecordStore
  • D. Global Events
  • E. MIDP Event Handler

Answer : D

Question 3

Consider the BusyWaiter class defined below:

An application uses this class by creating an instance of BusyWaiter and then launching 20
threads that each invoke doWork(). Most of the time, _count is equal to 400 after all
threads complete, but occasionally it was observed to be less than 400. What is the cause
of the incorrectly computed value for _count? (Choose one.)

  • A. Threads can deadlock in the while loop on line 7Threads can deadlock in the while loop on line 7
  • B. The "while" loop on line 7 is missing a block of code to execute
  • C. It is possible for 2 threads to be executing line 9 at one time
  • D. Line 10 should have been located between lines 6 and 7
  • E. Line 9 should have been written "count = count + 1"

Answer : C

Question 4

A developer has generated a custom code signing key and now needs to use it to restrict
access to data stored in the persistent store. Which two of the following methods will
accomplish this? (Choose two.)

  • A. Wrap the object in a ControlledAccess object before storing it in the PersistentStore
  • B. Wrap the object in a ControlledAccess object after storing it in the PersistentStore
  • C. Wrap the PersistentStore in a ControlledAccess object
  • D. Encrypt the object using the ControlledAccess class
  • E. Specify the signer ID of the code signing key when the object is stored in the PersistentStore

Answer : A,E

Question 5

A developer is creating a BlackBerry device application that can check the application
controls and request additional permissions if needed. Which API must the new application
use? (Choose one.)

  • A. ApplicationManager
  • B. OptionsManager
  • C. ControlledAccess
  • D. ApplicationPermissionsManager
  • E. ITPolicy

Answer : D

Question 6

According to the BlackBerry device UI Guidelines, what is the best practice for
implementing a drop down list if the BlackBerry device user is not required to select a value
from it? (Choose one.)

  • A. Include an /A?option in the drop down list
  • B. Include a blank option in the drop down list
  • C. Include a o Option?option in the drop down list
  • D. Include a one?option in the drop down list
  • E. Include a ot Applicable?option in the drop down list

Answer : D

Question 7

An application stores timing data to determine average throughput. It is normally started by
the BlackBerry device user and continues to run indefinitely. The timing algorithm adds the
current time into a Vector at regular intervals and then computes the average throughput at
the same intervals. The computed average is then reported to the user in the application
graphical user interface. What is the problem with this algorithm in terms of its memory
usage? (Choose one.)

  • A. A Vector is an inefficient structure for this type of data
  • B. The data will not be garbage collected when the application exits
  • C. The data should not be stored in persistent memory
  • D. The default capacity increment of the Vector is too small
  • E. The memory use increases the longer the application is alive

Answer : E

Question 8

Consider the code for Counter class below:

Almost every time the go() method is invoked a deadlock occurs between the created
threads. What is the cause of the deadlock? (Choose one.)

  • A. The run() method is not declared "synchronized"
  • B. The locks of the Vectors are acquired in different orders
  • C. The "c1" Counter is started before the "c2" Counter
  • D. The explicit synchronization on the Vector object conflicts with the built-in synchronization
  • E. The "synchronized(_v2)" statement between lines 10 and 11 is missing.

Answer : B

Question 9

An organization has announced that their new application is for the BlackBerry device user
who is constantly on the go. These users have little time to watch television at home and
would rather have TV programs sent directly to their BlackBerry devices. A developer has
been contacted by the organization to implement this client on the BlackBerry device.
Which API must be used in the implementation of this BlackBerry device application?
(Choose one.)

  • A. SQLite
  • B. Multimedia
  • C. Content Hander
  • D. Image
  • E. OpenVG

Answer : B

Question 10

An application allows doctors to view and update patient records. Patient record data is
kept in a custom persistable class. The doctor could store thousands of patient records
within the application, viewing and updating multiple records throughout the day. Which two
will allow for the most efficient storage and retrieval of data using the BlackBerry Persistent
Store? (Choose two.) A Use a Vector to store all records

  • A. Use an array to contain all records
  • B. Use object grouping on all records
  • C. Use a PersistentObject for each record
  • D. Use a Hashtable to hold all records

Answer : B,C

Question 11

Click the Task button to open this item. Once you have completed this item and have
selected Done, you may click Next to proceed to the next item.

Answer :

Question 12

Click the Task button to open this item. Once you have completed this item and have
selected Done, you may click Next to proceed to the next item.

Answer :

Question 13

An organization that manufactures Bluetooth enabled sensors capable of connecting with
BlackBerry devices has asked a developer to write an application that stores months worth
of sensor readings performed by traveling technicians in a proprietary format. The stored
readings are copied via USB when the technicians return to headquarters. Which data
storage mechanism will meet these requirements? (Choose one.)

  • A. RecordStore
  • B. PersistentStore
  • C. FileConnection
  • D. RuntimeStore
  • E. SQLite

Answer : C

Question 14

What is the name of the command line compiler used to build BlackBerry device specific
applications that require the use of RIM signing tools? (Choose one.)

  • A. javac.exe
  • B. javaw.exe
  • C. rapc.exe
  • D. jadtool.exe
  • E. cldcc.exe

Answer : B

Question 15

Which two of the following file extensions represent RIM specific internationalization
resource files? (Choose two.)

  • A. .rry
  • B. .alx
  • C. .cod
  • D. .rrc
  • E. .rrh

Answer : D,E

Page 1