Click the Task button.
Place each code snippet where it belongs.
Select and Place:

Given:
a new record store rs, of type javax.microedition.rms.RecordStore containing zero records
a method called addNewRecord that adds a record to rs
And:
21.
addNewRecord("Amy");
22.
addNewRecord("Bill");
23.
addNewRecord("Candy");
24.
addNewRecord("Doug");
25.
rs.deleteRecord(1);
26.
rs.deleteRecord(3);
27.
addNewRecord("Ethan");
28.
addNewRecord("Frank");
29.
int nextRecNum = rs.getNextRecordID(); What is the value of nextRecNum?
A. 7
B. 5
C. 4
D. 6
Which two media controls are guaranteed to be available to any MIDP 2.0 device? (Choose two.)
A. RecordControl
B. PitchControl
C. VolumeControl
D. VideoControl
E. ToneControl
Given:
MIDlet-Push-1: datagram://:444, com.fooworks.PushExample, *
MIDlet-Push-2: datagram://:555, com.fooworks.PushExample, *
are statically registered push connections and given:
11.
protected void startApp() {
12.
String[] connections = PushRegistry.listConnections(true);
13.
if(connections.length == 0) {
14.
connections = PushRegistry.listConnections(false);
15.
for (int i=0; i < connections.length; i++) {
16.
new DatagramHandler(connections[i]).start();
17.
}
18.
} else {
19.
for (int i=0; i < connections.length; i++) {
20.
new DatagramHandler(connections[i]).start();
21.
}
22.
}
23.
}
Which two identify what will go wrong if the code is invoked by the Application Management
Software in response to an inbound connection notification? (Choose two.)
A. Duplicate DatagramHandler objects are created if the MIDlet is paused and then resumed.
B. An IOException is thrown if there are no active connections.
C. The first inbound datagram is handled, but all other datagrams are missed.
D. Datagrams for the active connection are handled, but any datagrams sent to the other port are missed.
E. The first inbound datagram is ignored, all subsequent datagrams are handled by DatagramHandler.
A MIDlet that is to be installed on a phone has different values for the MIDlet-Name property between the JAD file and the manifest in the JAR file. Which is true?
A. The value in the JAD file overrides the value in the manifest.
B. A dialog is presented to resolve the conflict.
C. The MIDlet installation process will be aborted.
D. The value in the manifest overrides the value in the JAD file.
Given: MIDlet Suite A public class Person public class Address MIDlet Suite B public class Person Which is true?
A. Person in MIDlet Suite B is NOT allowed access to the Address class defined in MIDlet Suite A.
B. Person in MIDlet Suite B is allowed access to the Address class defined in MIDlet Suite
C. Person in MIDlet Suite B is allowed access to Address class in MIDlet Suite A based on the protection domain.
D. Person in MIDlet Suite B is allowed restricted access to the Address class in MIDlet Suite A.
Which two are true regarding record stores? (Choose two.)
A. All records within a record store have the same length.
B. MIDlets within the same suite can access the record stores of other MIDlets in the same suite.
C. Record stores can be locked.
D. MIDlets within the same suite CANNOT access the record stores of other MIDlets in the same suite.
E. The first created in a record store has a record ID of 1.
F. When a MIDlet suite is removed, record store contents remain on the device.
G. Record store names are case insensitive.
Assume a particular JTWI phone supports server socket connections. A MIDlet running on the phone attempts to register a connection using:
PushRegistry.registerConnection(connection, midlet, filter);
Assume connection, midlet, and filter are NOT null. The statement is executed and throws a ConnectionNotFoundException.
What causes the exception?
A. The specified MIDlet does NOT exist.
B. The syntax of connection is invalid.
C. The phone does NOT support push connections using server sockets.
D. The requested connection is already registered.
What is the minimum number of received SMS messages that a JTWI device must be able to concatenate?
A. no minimum
B. 5
C. 3
D. 10
E. 32
Click the Exhibit button.
The method in the Exhibit must create an HTTP GET connection that works reading both of the following HTTP server response cases:
HTTP server response headers n.1
1.
HTTP/1.1 200 OK
2.
Server: MyServer/1.3.0
3.
Content-Length: 3245
4.
Content-Type: text/html
HTTP server response headers n.2
1.
HTTP/1.1 200 OK
2.
Server: MyServer/1.3.0
3.
Content-Type: text/html
Which two can be used in the fragment of code starting at line 12? (Choose two.)

A. 12. int ch;
13.
while ((ch = is.read()) != -1) {
14.
//...
20. }
B. 12. int ch;
13.
while ((ch = is.read()) == -1) {
14.
//...
20. }
C. 12. if (len > 0) {
13.
byte[] data = new byte[len];
14.
int actual = is.read(data);
15.
//...
20.
} else {
21.
int ch;
22.
while ((ch = is.read()) != -1) {
23.
//...
examollectionvce.com Leaders in IT Certification 153

30.
}
31.
}
D. 12. byte[] data = new byte[len];
13. int actual = is.read(data);