1.
Given a MIDP 2.0 device supports alpha blending, a MIDlet needs to render semi-transparent images of size 10x10 pixels. However, these images need to be
generated at runtime. That is, they CANNOT be loaded as PNGs. What is the correct way to create a 10x10, red, semitransparent image, using only the MIDP 2.0
API?
2.
Which API is guaranteed to be available for use by untrusted MIDlet suites with explicit confirmation from the user?
3.
What is TimeBase?
4.
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?
5.
Which is true about the garbage collector?
6.
A JTWI device has a working socket implementation. A MIDlet requests permission to use socket connections on this device using the attribute MIDlet-Permissions-
Opt, but is denied permission.
Given:
20. public void connect() {
21. try {
22. String addr = "socket://host.com:79";
23. SocketConnection sc;
24. sc = (SocketConnection) Connector.open(addr);
25. sc.setSocketOption(SocketConnection.LINGER, 5);
26. InputStream is = sc.openInputStream();
27. OutputStream os = sc.openOutputStream();
28. os.write("\\r\\n".getBytes());
29. int ch = is.read();
30. // ...
35. } catch (IOException ioe) {
36. // ...
40. }
41. }
Which is true assuming that the argument to Connector.open() points to a valid destination, and the device has resources to create new socket connections?
7.
Which four are absent from the CLDC virtual machine? (Choose four.)
8.
When can a MIDlet suite be installed in the untrusted domain?
9.
A MIDlet suite has the application descriptor fragment: MIDlet-1: E-mail, email.png, com.example.EmailMIDlet The MIDlet suite has the necessary permissions to
use the PushRegistry. What line does the application descriptor need to register the MIDlet suite for socket push connections on port 79?
10.
Given:
a record store of type javax.microedition.rms.RecordStore, containing five records whose contents are Alice, Bill, Candice, Dean, and Ethel, respectively an
enumeration for the record store that specifies a comparator that sorts alphabetically The first call to the enumeration is previousRecord().
Which would be returned by a second call to previousRecord()?