1Z0-869試験無料問題集「Oracle Java Mobile Edition 1 Mobile Application Developer Certified Professional 認定」
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?
正解:A
解答を投票する
Given:
A record store has three records: Record 1 contains Apple, Record 2 contains Mango, Record 3 contains Cherry, and the RecordComparator class:
1 . public class CompareTest implements RecordComparator {
2 . public int compare(byte[] rec1, byte[] rec2) {
3 . String str1 = new String(rec1), str2 = new String(rec2);
4 . int result = str2.compareTo(str1);
5 . if (result == 0)
6 . return RecordComparator.EQUIVALENT;
7 . else if (result < 0)
8 . return RecordComparator.PRECEDES;
9 . else
1 0. return RecordComparator.FOLLOWS;
1 1. }
1 2. }
What is the return order of the records for an enumerator using CompareTest?
A record store has three records: Record 1 contains Apple, Record 2 contains Mango, Record 3 contains Cherry, and the RecordComparator class:
1 . public class CompareTest implements RecordComparator {
2 . public int compare(byte[] rec1, byte[] rec2) {
3 . String str1 = new String(rec1), str2 = new String(rec2);
4 . int result = str2.compareTo(str1);
5 . if (result == 0)
6 . return RecordComparator.EQUIVALENT;
7 . else if (result < 0)
8 . return RecordComparator.PRECEDES;
9 . else
1 0. return RecordComparator.FOLLOWS;
1 1. }
1 2. }
What is the return order of the records for an enumerator using CompareTest?
正解:A
解答を投票する
Given the MIDlet code:
11. DatagramConnection dgc
(DatagramConnection)Connector.open("datagram://:444");
1 2. Datagram datagram = dgc.newDatagram(20);
1 3. dgc.receive(datagram);
1 4. byte[] data = datagram.getData();
1 5. String s = new String(data);
1 6. list.append(s, null);
1 7. System.out.println("Datagram received: " + s);
Which two are true regarding the portability of the code between devices? (Choose two.)
11. DatagramConnection dgc
(DatagramConnection)Connector.open("datagram://:444");
1 2. Datagram datagram = dgc.newDatagram(20);
1 3. dgc.receive(datagram);
1 4. byte[] data = datagram.getData();
1 5. String s = new String(data);
1 6. list.append(s, null);
1 7. System.out.println("Datagram received: " + s);
Which two are true regarding the portability of the code between devices? (Choose two.)
正解:A,C
解答を投票する
Given:
1 2. class TestRecordListener implements RecordListener {
1 3. public void recordAdded(RecordStore rcs, int recordId) {
1 4. // ...
2 5. }
2 6. public void recordDeleted(RecordStore rcs, int recordId) {
2 7. // ...
3 3. }
3 4. public void recordChanged(RecordStore rcs, int recordId) {
3 5. // ...
4 3. }
4 4. }
If rs is a valid and open record store, how can you properly associate a record listener with rs?
1 2. class TestRecordListener implements RecordListener {
1 3. public void recordAdded(RecordStore rcs, int recordId) {
1 4. // ...
2 5. }
2 6. public void recordDeleted(RecordStore rcs, int recordId) {
2 7. // ...
3 3. }
3 4. public void recordChanged(RecordStore rcs, int recordId) {
3 5. // ...
4 3. }
4 4. }
If rs is a valid and open record store, how can you properly associate a record listener with rs?
正解:D
解答を投票する