Click the Task button. Given:
9.
Player p = Manager.createPlayer("http://webserver/music.mp3");
10.
p.setLoopCount(5);
11.
p.start();
12.
p.stop();
13.
p.close();
What is the order of the states that the Player goes through?
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
A MIDlet suite on a device uses socket connections. The device always asks the user for permission when the suite tries opening a socket connection. What is always false about the MIDlet suite?
A. It is trusted and requests permission to use sockets with MIDlet-Permissions-User.
B. It is trusted and requests permission to use sockets with MIDlet-Permissions.
C. It is untrusted.
D. It is trusted and requests permission to use sockets with MIDlet-Permissions-Opt
A MIDP 2.0 compliant device creates an HTTP connection to a server that supports HTTP 1.1. Which is true?
A. There is no such thing as a 1.1 version of HTTP.
B. The device definitely does NOT support HTTP 1.1.
C. The device may or may NOT support HTTP 1.1.
D. The device definitely supports HTTP 1.1.
Which statement is true about TiledLayer and Sprite objects maintained by a LayerManager object?
A. Either Sprite or TiledLayer objects may be inserted at a unique position in the LayerManager.
B. TiledLayer objects are always added as the background layer.
C. Once either Sprite or TiledLayer objects are added, the order can be changed only by creating and adding to a new LayerManager.
D. Sprite objects are always added as the background layer.
Which three are true? (Choose three.)
A. A MIDlet suite consists of only one JAR file.
B. Different MIDlet suites can share data with each other.
C. A MIDlet suite can have more than one class that extends the MIDlet class.
D. A MIDlet suite is an array of MIDlet objects.
E. The names of MIDlet classes that belong to different MIDlet suites must be different.
Which are valid states for an HttpConnection?
A. setup, connected, closed
B. created, active, closed
C. connected, disconnected
D. started, paused, destroyed
Given:
10. //...
20.
int[] foo = new int[10000];
21.
foo = null;
22.
System.gc();
23.
//...
Which is true once the program execution reaches line 23?
A. The garbage collector CANNOT reclaim the memory allocated to foo because the reference is nulled out.
B. The garbage collector is triggered but there are no guarantees that any memory has been reclaimed.
C. The garbage collector suspends the program until more memory becomes available.
D. The garbage collector is triggered and memory is guaranteed to be reclaimed.
What is true when an enumeration applies both a RecordFilter class and RecordComparator class on a record store?
A. An enumeration CANNOT apply both a RecordFilter and RecordComparator.
B. The records that match the search criteria in RecordFilter will be returned using the ordering defined by RecordComparator.
C. All records will always be available as part of the enumeration result set.
D. The return order of the result set is undefined.
E. The records that match the search criteria in RecordComparator will be returned using the ordering defined by RecordFilter.
Which two events can result in the removal of a MIDlet's dynamic push connection registration? (Choose two.)
A. Using a call to PushRegistry.removeConnection().
B. Using a call to PushRegistry.unregisterConnection().
C. Opening the connection using Connector.open().
D. Using a call to PushRegistry.registerConnection().
E. When MIDlet.destroyApp() is called.
F. When the MIDlet is uninstalled.