Click the Task button.
Place the classes and methods in the correct positions.
Select and Place:

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
Click the Exhibit button. What is the result?

A. myForm contains the string "run count: 2".
B. An exception is thrown at runtime.
C. myForm contains the string "run count: 0".
D. myForm contains the string "run count: 1".
E. myForm contains the string "waiting...".
Which method is initially called when the MIDlet starts in response to a push notification?
A. PushRegistry.notifyIncomingConnection()
B. MIDlet.startApp()
C. MIDlet.notifyApp()
D. PushRegistry.listConnections()
E. MIDlet.pushApp()
F. MIDlet.resumeRequest()
Click the Exhibit button.
NewsMIDlet and CalendarMIDlet are in different MIDlet suites. Neither has any static push registrations.
Suppose NewsMIDlet registers dynamically for datagram push notifications on port 79.
What happens if a method CalendarMIDlet.init() attempts to open a UDPDatagramConnection on port 79?

A. init() succeeds without user confirmation, and removes NewsMIDlet's registration for datagram push connections.
B. init() fails to open the connection.
C. init() succeeds only with user confirmation.
D. init() succeeds without user confirmation, and leaves untouched NewsMIDlet's registration for datagram push connections.
Given:
10. //...
20.
Manager.playTone(ToneControl.C4, 100, -100);
21.
System.out.println("done");
22.
//... Which is true?
A. Compilation fails.
B. done is printed after playTone() completes.
C. done is printed directly after playTone() is called.
D. An IllegalArgumentException is thrown at runtime.
Given:
DatagramConnection dConnection = (DatagramConnection)
Connector.open("datagram://:9009");
Which is true?
A. A client mode datagram connection is created for receiving datagrams.
B. A client mode datagram connection is created only for sending datagrams.
C. A server mode datagram connection is created for both sending and receiving datagrams by way of the same port.
D. A server mode datagram connection is created for both sending and receiving datagrams using different ports.
Given the MIDlet code:
7.
String s = System.getProperty("microedition.configuration");
8.
if (!s.equals("CLDC-1.1")) {
9.
s = "CLDC-1.1";
10.
}
11.
System.setProperty(s); Which statement is true?
A. SecurityException is thrown at runtime.
B. Property is set to "CLDC-1.1."
C. Compilation fails because of an error in line 11.
D. Compilation fails because of an error in line 7.
Given the JAD file fragment:
MIDlet-1: Calendar, calendar.png, com.example.CalendarMIDlet
MIDlet-2: Chat, chat.png, com.example.ChatMIDlet
What CalendarMIDlet code launches ChatMIDlet at the time specified by variable chatTime?
A. PushRegistry.registerAlarm("MIDlet-1", chatTime);
B. PushRegistry.registerAlarm ("com.example.ChatMIDlet", chatTime);
C. PushRegistry.registerAlarm("Chat", chatTime);
D. PushRegistry.registerAlarm (Class.forName("com.example.ChatMIDlet"), chatTime);
Which two guarantee a wireless message will be removed from the incoming message buffer by the Application Management Software? (Choose two.)
A. The user denies permission to execute the application.
B. The incoming message buffer is full.
C. The message does NOT pass the filter defined in the connection URL.
D. The application has processed the incoming message.