资源预览内容
第1页 / 共8页
第2页 / 共8页
第3页 / 共8页
第4页 / 共8页
第5页 / 共8页
第6页 / 共8页
第7页 / 共8页
第8页 / 共8页
亲,该文档总共8页全部预览完了,如果喜欢就下载吧!
资源描述
Exam:SUN 310- 110 Title:Sun Certified Mobile Application Developer for J2ME, V1.0 Version :Demo 1. During a MIDlet suite installation, a JTWI- compliant device performs the following actions: downloads and installs the JAD file downloads the JAR file fails to install the MIDlet suite What is the correct behavior? A. The device must log the failure in persistent storage. B. The device must free the space allocated for that MIDlet suite. C. The device must save the JAD and the JAR file for future upgrading. D. The device must save the JAD file for future downloads of the same MIDlet suite. Answer: B 2. Given: a JAR containing a MIDlet named TesterMIDlet a JAD with this content: CertificationExam: SunCertifiedMobileApplicationDeveloperMIDlet- 1:TesterMIDlet,certification.TesterMIDlet MIDlet- Jar- Size: 2038 MIDlet- Jar- URL: Certification.jar MIDlet- Name: Certification MIDlet- Vendor: ATesting Company MIDlet- Version: 1.0 MicroEdition- Configuration: CLDC- 1.0 MicroEdition- Profile: MIDP- 2.0 This MIDlet needs to get the property with the key CertificationExam defined in the JAD. This needs to be assigned to a String ExamName from within the MIDlet.startApp() method. What is the correct way to accomplish this? A. String ExamName = System.getProperty(“CertificationExam“); B. String ExamName = this.getAppProperty(“CertificationExam“); C. String ExamName = System.getProperty(“MIDlet- CertificationExam“); D. String ExamName = this.getAppProperty(“MIDlet- CertificationExam“); Answer: B 3. A MIDlet has entered the paused state. Which is a valid action to attempt to make it active? A. The MIDlet calls its own startApp() method. B. The MIDlet has to wait quietly to be rescheduled. C. The MIDlet cannot revert back to the active state. D. The MIDlet calls resumeRequest() through a timer. Answer: D 4. Which is true regarding the use of Thread objects in a CLDC 1.1 compliant virtual machine? A. To stop a Thread, a developer can use the stop() method. B. AThread can be stopped only from the inside of a MIDlet class. C. There is no way for one Thread to force another Thread to stop. D. AThread lives until it exits from the run() method it invoked at startup. Answer: D 5. Which is used to retrieve the version of MIDP a device has implemented? A. System.getProperty(“microedition.profiles“) B. System.getProperty(“microedition.platform“) C. System.getAppProperty(“microedition.platform“) D. System.getAppProperty(“microedition.profiles“) E. System.getProperty(“microedition.configuration“) Answer: A 6. Given a MIDlet suite with the following JAD file: 1. MIDlet- 1: MyMIDlet, MyMIDlet.png, MyMIDlet 2. MIDlet- Jar- Size: 23040 3. MIDlet- Name: MyFirstMIDlet 4. MIDlet- Version: 1.0 5. MIDlet- Jar- URL: http:/mywebserver.com/mymidlets/MyMIDlet.jar 6. MIDlet- Vendor: MyCompany and manifest file: 1. MIDlet- Name: MyFirstMIDlet 2. MIDlet- Version: 1.1 3. MIDlet- Vendor: MyCompany 4. MIDlet- 1: MyMIDlet, MyMIDlet.png, MyMIDlet Which is true about the installation? A. The installation succeeds. B. The installation fails due to an attribute mismatch. C. The installation fails because the JAD file is invalid. D. The installation fails because the manifest is invalid. Answer: B 7. Which two are true about class file verification as defined by the CLDC specification? (Choose two.) A. Verification is NOT required. B. Verification can use a custom implementation. C. Verification is completed at compile time and no further verification is necessary. D. Verification can use the same implementation as defined in the JVM specification. Answer: BD 8. Given the MIDlet code: 12. File f = new File(“myFile.txt“); 13. FileOutputStream ds = new FileOutputStream(f); 14. OutputStreamWriter os = new OutputStreamWriter(ds); 15. BufferedWriter buf = new BufferedWriter(os); 16. buf.write(c); What is the result? A. The code compiles and runs, but line 16 is ignored. B. Compilation succeeds, but an exception is thrown at runtime. C. The code compiles and runs, and then writes the character c to the file myFile.txt. D. Compilation fails because the code uses one or more classes, which are not supported in CLDC 1.1. Answer: D 9. Given: 10. /. 20. try 21.Hashtable table = new Hashtable(); 22.for (;) table.put(new Object(), new Object(); 23. catch (OutOfMemoryException e) 24.Display.getDisplay().setCurrent(new Alert(“Out of Memory!“); 25. 26. /. Which is true? A. Compilation fails. B. The program hangs at line 22. C. Out of Memory! is printed to the system console. D. An exception is thrown at runtime but there is no guarantee an alert will be shown to the user. Answer: D 10. Which two are true regarding error handling for classes that exist in both CLDC and J2SE? (Choose two.) A. The set of error classes is essentially the same in CLDC and J2SE. B. The set of error classes is much reduced in CLDC to help reduce the overhead of the JVM. C. If a class throws an error in CLDC, it should throw the same error as in J2SE or its nearest superclass. D. Ther
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号