SCMAD Mock Exam by Mark Spritzler
1. Which method(s) can be called to get the MIDP specification?
A. System.getAppProperty("MicroEdition-Profile"); B. System.getProperty("microedition.profiles"); C. System.getProperty("MicroEdition-Profile"); D. MIDlet.getProperty("microedition.profiles"); E. MIDlet.getAppProperty("MicroEdition-Profile");
2. Which Specification(s) will you not find a DataSource
available?
A. CLDC 1.0 B. MIDP 2.0 C. CLDC 1.1 D. MMAPI 1.1 E. WMA 1.1
3. What is the results of the following code
code: public class MyMidlet extends MIDlet implements CommandListener, Runnable { private Display mDisplay; private Form myForm; private Command exitCommand; private StringItem myString;
MyMidlet(){ myForm = new Form("SCMAD Mock Exam"); exitCommand = new Command("Exit",Command.EXIT, 0); myString = new StringItem("12"); myForm.append(myString); myForm.addCommand(exitCommand); myForm.setCommandListener(this); } public void startApp(){ mDisplay = Display.getDisplay(this); mDisplay.setCurrent(myForm); } public void commandAction (Command c, Displayable s) { destroyApp(false); notifyDestroyed(); } public void run(){ } public void pauseApp(){ } public void destroyApp(boolean unconditional){ } }
A. Will Not Compile B. Will Compile, but will through an Exception C. Shows 12 on the devices screen D. Displays nothing E. Fails to install
4. What method(s) will put a Midlet into the Paused state?
A. destroyApp() B. startApp() C. new D. pauseApp() E. notifyDestroyed()
5. Which are valid Attribute Names for a Jad File?
A. MIDlet-Delete-Notify B. MIDlet-Opt-Permissions C. MIDlet-Icon D. MIDlet-Name E. MIDlet-Device-Type
6. Which attribute(s) are mandatory for a Jad File?
A. MIDlet-Install-Notify B. MIDlet-Data-Size C. MIDlet-Permissions D. MIDlet-Vendor E. MIDlet-Jar-URL
7. Which attribute(s) are optional for a Jad File?
A. MIDlet-<n> B. MIDlet-Push-<n> C. MIDlet-Vendor D. MIDlet-Name E. MIDlet-Description
When Installing a MIDLet a code is returned. Place Each Code
with its corresponding message
(might not be that specific on test, I hope not)
8. 900 A. Attribute mismatch
9. 904 B. Invalid Jar
10. 905 C. Success
11. 907 D. Push Registration Failure
12. 911 E. Jar Size Mismatch
13. Is the Timer class Thread-safe?
A. True B. False
For the following use
A = Mandatory
B = Conditional
C = Minimum
D = N/A
According to the JTWI specs, the following specifications are
one of
the
four above
14. MMAPI
15. MIDP 2.0
16. CLDC 1.1
17. CLDC 1.0
18. WMA 1.1
19. Select all that are true regarding RecordStores.
A. When updating a record, another user can update the same
record at the same time.
B. All RecordStore operations are atomic, synchronized, and serialized C. If there is no RecordStore when calling RecordStore.openRecordStore("MyRecords", true) a RecordStoreNotFoundException is thrown
D. A call to RecordStore.deleteRecord will allow the recordID
to be reused
E. RecordStoreNames are case-sensitive and cannot exceed 32 characters.
20. Assume you have two MIDlet suites that are sharing
a RecordStore.
MIDletA created the records store.
What are the results of the following code. Assume all interface
methods are correctly
implemented and the form and commands are already being
displayed. the user selected the Delete command object
code: public class MIDletB extends MIDlet implements CommandListener, Runnable { private Display myDisplay; private Form myForm; private Command deleteRecordStore; private Command exitRecordStore; private RecordStore sharedRecords; public MIDletB(){ try { sharedRecords = RecordStore.opeRecordStore ("BankAccounts", "VendorName", "MIDletASuite"); } catch (Exception e) { // Do some exception handling here } } public void commandAction(Command c, Displayable s) { if (c == deleteRecordStore) { try { RecordStore.deleteRecordStore("BankAccounts"); } catch (Exception e) { // Do some exception handling here } } ... } }
A. The shared RecordStore called BankAccounts is deleted from
the mobile device.
B. The shared RecordStore called BankAccounts is deleted from
MIDletB Suite only
C. The shared RecordStore called BankAccounts still exists,
but all the records are deleted.
D. An RecordStoreException is thrown in the openRecordStore() call. E. An RecordStoreException is thrown in the deleteRecordStore() call.
F. An RecordStoreException is thrown in the deleteRecordStore()
call because the vendor and suite name is missing in the parameters.
Answers: 1. B, E 2. A, B, C, E 3. C 4. C, D 5. A, C, D 6. D, E 7. A, B, E 8. C 9. E 10. A 11. B 12. D 13. A 14. B 15. A 16. D 17. C 18. A 19. B, E 20. E
Discussion on this mock exam at JavaRanch
Mock/Practice exams for other Sun certifications
SCJP mock exams
SCJD mock exams
SCWCD mock exams
SCBCD mock exams
SCEA mock exams
|