1.
Given:
30. public boolean X(byte[] Y) throws IllegalArgumentException {
31. ByteArrayInputStream bais = new ByteArrayInputStream(arg);
32. DataInputStream dis = new DataInputStream(bais);
33. String type = null;
34. try {type = dis.readUTF();}
35. catch (Exception e) { }
36. return(Z);
37. }
Which substitutions for X, Y, and Z in the code create a valid implementation of RecordFilter that matches records whose type is NOT deleted?
2.
The binding of networking protocols to a MIDlet at runtime can be compared to a type of relationship. Which relationship most closely matches the binding?
3.
Which class is available for use in trusted and untrusted domains?
4.
Assuming an application descriptor contains: MIDlet-Data-Size: 4096 Which is true?
5.
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?
6.
Given:
Font font = Font.getFont(
Font.FACE_SYSTEM,
Font.STYLE_BOLD | Font.STYLE_ITALIC | Font.STYLE_UNDERLINED,
Font.SIZE_MEDIUM);
If Font.STYLE_ITALIC is unavailable on the device, what is the result?
7.
Which creates a new record store of type javax.microedition.rms.RecordStore that can be shared between MIDlet suites?
8.
wav is a content type supported on a device that executes:
10. Player p;
11. p = Manager.createPlayer("http://foobar.sun.com/sound.wav");
12. p.prefetch();
Which is true?
9.
Which is true regarding CLDC?
10.
An open record store, rs, contains five records with record IDs 1, 2, 3, 4, and 5.
1. byte[] data = new byte[10];
2.
3. for (int i = 1; i <= rs.getNumRecords(); i++)
4. {
5. if (rs.getRecordSize(i) > data.length)
6. data = new byte[rs.getRecordSize(i)];
7. rs.getRecord(i, data, 0);
8. System.out.println(new String(data));
9. }
If record ID 3 is deleted, and the code is run, what is the result?