Free Cheat-test Samples and Demo Questions Download
Adobe exams Adobe
Apple exams Apple
Avaya exams Avaya
Check Point exams Check Point
Cisco exams Cisco
Citrix exams Citrix
CIW exams CIW
CompTIA exams CompTIA
CWNP exams CWNP
EC-Council exams EC-Council
EMC exams EMC
Exin exams Exin
Fortinet exams Fortinet
GIAC exams GIAC
Hitachi exams Hitachi
HP exams HP
IBM exams IBM
Isaca exams Isaca
ISC exams ISC
ISEB exams ISEB
Juniper exams Juniper
LPI exams LPI
McAfee exams McAfee
Microsoft exams Microsoft
Oracle exams Oracle
PMI exams PMI
Riverbed exams Riverbed
SNIA exams SAP
Sun exams SAS
Symantec exams Symantec
VMware exams VMware
All certification exams

Sun 310-110 Exam - Cheat-Test.com

Free 310-110 Sample Questions:

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: Sun Certified Mobile Application DeveloperMIDlet­1: TesterMIDlet, , certification.TesterMIDlet MIDlet­Jar­Size: 2038 MIDlet­Jar­URL: Certification.jar MIDlet­Name: Certification MIDlet­Vendor: A Testing 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.A Thread 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.A Thread 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: B, D

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 two options to synthesize tones: Manager.playTone(); And: 5. //... 11. Player p = Manager.createPlayer(Manager.TONE_DEVICE_LOCATOR); 12. p.realize(); 13. ToneControl c = (ToneControl)p.getControl("ToneControl"); 14. c.setSequence(sequence); 15. p.start(); Which is true?
A.Both options have the same result.
B.The second option lets developers set playback pitch.
C.The second option lets developers set playback tempo.
D.Manager.TONE_DEVICE_LOCATOR is not a valid field.
Answer: C

10.Which is the most efficient method to generate a silence between tones in a tone sequence?
A.pause playback and set volume to ­1
B.use RateControl with ToneControl
C.use the constant ToneControl.SILENCE
D.stop the playback of the tone sequence and restart it
Answer: C

11.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

12.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.There is no correspondence between the errors defined by CLDC and J2SE because the needs of
CLDC and J2SE are so different.
Answer: B, C

13.What is the minimum volatile memory requirement identified by the CLDC 1.1 specification?
A.32 KB
B.64 KB
C.128 KB
D.160 KB
Answer: A

14.A MIDP 2.0 developer is building a game using the MIDP game API that requires user control over the direction of a Sprite within a GameCanvas. The developer wants to keep performance high and reduce memory use. Which two fulfill the goals? (Choose two.)
A.suppress key events for the GameCanvas object
B.implement keyPressed(), keyReleased(), and keyRepeated()
C.poll for the current state of user key input in a loop, using getKeyStates()
D.in the GameCanvas object, use actual key codes rather than mapped game action constants
Answer: A, C

 

16.The developer is designing a game that uses the LayerManager and Sprite classes. Three Sprite objects are added to a LayerManager object and a call is placed to the LayerManager.paint(Graphics, x, y) method. In what order are the Sprite objects rendered to the device display?
A.The Sprites are rendered in a random order.
B.The Sprites that are animated are rendered first.
C.The Sprites are rendered in order of descending index.
D.The Sprites are rendered in an implementation specific manner.
Answer: C

17.Which method in Canvas is overridden in GameCanvas?
A.paint()
B.getGraphics()
C.getKeyStates()
D.flushGraphics()
E.flushGraphics(int, int, int, int)
Answer: A

18.What is true when an enumeration applies both a RecordFilter class and RecordComparator class on a record store?
A.The return order of the result set is undefined.
B.All records will always be available as part of the enumeration result set.
C.An enumeration CANNOT apply both a RecordFilter and RecordComparator.
D.The records that match the search criteria in RecordComparator will be returned using the ordering defined by RecordFilter.
E.The records that match the search criteria in RecordFilter will be returned using the ordering defined by
RecordComparator.
Answer: E

19.Given: RecordStore rs = null; static final String REC_STORE = "appdata"; And, the record store does NOT already exist. Which is the correct way to open the record store, requesting the record store be created?
A.rs = RecordStore.openRecordStore(REC_STORE);
B.rs = RecordStore.createRecordStore(REC_STORE);
C.rs = RecordStore.openRecordStore(REC_STORE, 1);
D.rs = RecordStore.createRecordStore(REC_STORE, 1);
E.rs = RecordStore.openRecordStore(REC_STORE, true);
F.rs = RecordStore.createRecordStore(REC_STORE, true);
Answer: E

20.Given: rs is an object of type javax.microedition.rms.RecordStore. baos is an object of type java.io.DataOutputStream. recId is an int. Which adds a record to rs?
A.byte [] b = baos.write(); try { recId = rs.add(b, 0, b.length); } catch (Exception e) { }
B.byte [] b = baos.toByteArray(); try { recId = rs.add(b, 0, b.length); } catch (Exception e) { }
C.byte [] b = baos.writeByteArray(); try { recId = rs.add(b, 0, b.length); } catch (Exception e) { }
D.byte [] b = baos.write(); try { recId = rs.addRecord(b, 0, b.length); } catch (Exception e) { }
E.byte [] b = baos.toByteArray(); try { recId = rs.addRecord(b, 0, b.length); } catch (Exception e) { }
F.byte [] b = baos.writeByteArray(); try { recId = rs.addRecord(b, 0, b.length); } catch (Exception e) { }
Answer: E

21.Given: 12. class TestRecordListener implements RecordListener { 13. public void recordAdded(RecordStore rcs, int recordId) { 14. // ... 25. } 26. public void recordDeleted(RecordStore rcs, int recordId) { 27. // ... 33. } 34. public void
recordChanged(RecordStore rcs, int recordId) { 35. // ... 43. } 44. } If rs is a valid and open record store, how can you properly associate a record listener with rs?
A.rs.setRecordListener(new TestRecordListener())
B.rs.addRecordListener(new TestRecordListener())
C.rs.newRecordListener(new TestRecordListener())
D.rs.createRecordListener(new TestRecordListener())
Answer: B

22.Which two are true regarding record stores? (Choose two.)
A.Record stores can be locked.
B.Record store names are case insensitive.
C.The first created in a record store has a record ID of 1.
D.All records within a record store have the same length.
E.When a MIDlet suite is removed, record store contents remain on the device.
F.MIDlets within the same suite can access the record stores of other MIDlets in the same suite.
G.MIDlets within the same suite CANNOT access the record stores of other MIDlets in the same suite.
Answer: C, F

23.Which two are true when deleting a record store? (Choose two.)
A.If the record store is open, an exception will be thrown.
B.The record store must be open prior to calling deleteRecordStore().
C.The record store must be closed prior to calling deleteRecordStore().
D.For any registered listener of the record store, recordDeleted() will be called.
Answer: A, C

24.What are the rules for the look and feel of the user interface components?
A.The user interface look and feel may be drastically different on different devices.
B.The user interface is always in monochrome, so the developer should NOT use color.
C.The user interface always looks exactly as it does in the MIDP Reference Implementation.
D.The dimensions of all the user components are always the same on any device, even if they look different.
Answer: A

25.obscure is a content type unsupported on a device that executes: 10. String locator = "http://foobar.sun.com/content.obscure"; 11. Player player = Manager.createPlayer(locator); Which is true?
A.player is set to null.
B.An exception is thrown at runtime.
C.The file is interpreted as an ASCII file.
D.The file is interpreted as an HTML file.
Answer: B


© 2014 Cheat-Test.com, All Rights Reserved