Sun 310-110 Certified Mobile Application Developer for Exam Set 2

Given: 11. Alert alt = new Alert(""); 12. alt.setType(AlertType.ALARM); Which line of code requests alt to display an alert until acknowledged by the user?


Options are :

  • alt.setTimeout(Alert.MODAL);
  • alt.setTimeout(Alert.FOREVER);
  • alt.setType(Alert.MODAL);
  • alt.setType(Alert.FOREVER);

Answer : alt.setTimeout(Alert.FOREVER);

Sun 310-110 Certified Mobile Application Developer for Exam Set 3

Which is false about untrusted MIDlet suites?


Options are :

  • JTWI devices must treat all MIDP 1.0 suites as untrusted.
  • Untrusted MIDlet suites may access protected APIs or functions if given explicit user permission.
  • JTWI devices must treat all MIDP 2.0 suites as trusted.
  • An untrusted MIDlet suite does not request permissions explicitly in the JAR manifest or the application descriptor.

Answer : JTWI devices must treat all MIDP 2.0 suites as trusted.

Given: DataInputStream incoming = Connector.openDataInputStream("sms://+3125551234:3434"); Which is true?


Options are :

  • The port number indicated is a protected SMS port.
  • MessageConnection does NOT support InputStream objects.
  • The + in the URL is positioned incorrectly.
  • Port numbers are NOT allowed in SMS URLs.

Answer : MessageConnection does NOT support InputStream objects.

Which two are true about JTWI devices using SMS? (Choose two.)


Options are :

  • Multiple messages sent from point A to point B are NOT guaranteed to be delivered in the order in which they were sent.
  • Java applications are restricted to using port numbers between 2000 and 9207.
  • The payload for an SMS message can use the BinaryMessage interface
  • The payload for an SMS message segment CANNOT exceed 140 bytes.

Answer : Multiple messages sent from point A to point B are NOT guaranteed to be delivered in the order in which they were sent. The payload for an SMS message can use the BinaryMessage interface

Sun 310-110 Certified Mobile Application Developer for Exam Set 4

Which class is available for use in trusted and untrusted domains?


Options are :

  • javax.microedition.io.CommConnecti
  • javax.microedition.io.SocketConnection
  • javax.microedition.io.HttpsConnection
  • javax.microedition.io.Datagram

Answer : javax.microedition.io.HttpsConnection

Which two are true regarding error handling for classes that exist in both CLDC and J2SE? (Choose two.)


Options are :

  • If a class throws an error in CLDC, it should throw the same error as in J2SE or its nearest superclass.
  • The set of error classes is essentially the same in CLDC and J2SE.
  • There is no correspondence between the errors defined by CLDC and J2SE because the needs of CLDC and J2SE are so different.
  • The set of error classes is much reduced in CLDC to help reduce the overhead of the JVM.

Answer : If a class throws an error in CLDC, it should throw the same error as in J2SE or its nearest superclass. The set of error classes is much reduced in CLDC to help reduce the overhead of the JVM.

What is true when an enumeration applies both a RecordFilter class and RecordComparator class on a record store?


Options are :

  • An enumeration CANNOT apply both a RecordFilter and RecordComparator.
  • All records will always be available as part of the enumeration result set.
  • The records that match the search criteria in RecordComparator will be returned using the ordering defined by RecordFilter.
  • The return order of the result set is undefined.
  • The records that match the search criteria in RecordFilter will be returned using the ordering defined by RecordComparator.

Answer : The records that match the search criteria in RecordFilter will be returned using the ordering defined by RecordComparator.

Sun 310-110 Certified Mobile Application Developer for Exam Set 5

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?


Options are :

  • rs = RecordStore.openRecordStore(REC_STORE);
  • rs = RecordStore.createRecordStore(REC_STORE);
  • rs = RecordStore.openRecordStore(REC_STORE, 1);
  • rs = RecordStore.createRecordStore(REC_STORE, 1);
  • rs = RecordStore.openRecordStore(REC_STORE, true);

Answer : rs = RecordStore.openRecordStore(REC_STORE, true);

Which are valid states for an HttpConnection?


Options are :

  • connected, disconnected
  • setup, connected, closed
  • created, active, closed
  • started, paused, destroyed

Answer : setup, connected, closed

What is the minimum configuration that JTWI 1.0 requires?


Options are :

  • CLDC 1.0
  • CLDC 1.1
  • CDC
  • no specific configuration

Answer : CLDC 1.0

What are the rules for the look and feel of the user interface components?


Options are :

  • The dimensions of all the user components are always the same on any device, even if they look different.
  • The user interface always looks exactly as it does in the MIDP Reference Implementation.
  • The user interface look and feel may be drastically different on different devices.
  • The user interface is always in monochrome, so the developer should NOT use color.

Answer : The user interface look and feel may be drastically different on different devices.

Which statement is true about TiledLayer and Sprite objects maintained by a LayerManager object?


Options are :

  • Sprite objects are always added as the background layer.
  • TiledLayer objects are always added as the background layer
  • Once either Sprite or TiledLayer objects are added, the order can be changed only by creating and adding to a new LayerManager.
  • Either Sprite or TiledLayer objects may be inserted at a unique position in the LayerManager.

Answer : Either Sprite or TiledLayer objects may be inserted at a unique position in the LayerManager.

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?


Options are :

  • The file is interpreted as an ASCII file.
  • An exception is thrown at runtime.
  • player is set to null.
  • The file is interpreted as an HTML file.

Answer : An exception is thrown at runtime.

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?


Options are :

  • The device must save the JAD file for future downloads of the same MIDlet suite
  • The device must free the space allocated for that MIDlet suite
  • The device must save the JAD and the JAR file for future upgrading.
  • The device must log the failure in persistent storage.

Answer : The device must free the space allocated for that MIDlet suite

A MIDlet has entered the paused state. Which is a valid action to attempt to make it active?


Options are :

  • The MIDlet cannot revert back to the active state.
  • The MIDlet calls resumeRequest() through a timer.
  • The MIDlet calls its own startApp() method.
  • The MIDlet has to wait quietly to be rescheduled.

Answer : The MIDlet calls resumeRequest() through a timer.

Which two are true when deleting a record store? (Choose two.)


Options are :

  • For any registered listener of the record store, recordDeleted() will be called.
  • If the record store is open, an exception will be thrown.
  • The record store must be closed prior to calling deleteRecordStore().
  • The record store must be open prior to calling deleteRecordStore().

Answer : If the record store is open, an exception will be thrown. The record store must be closed prior to calling deleteRecordStore().

Which two are true about the javax.wireless.messaging.MessageConnection interface? (Choose two.)


Options are :

  • This interface is intended for all wireless messaging protocols.
  • An application can have both client and server mode MessageConnection instances open simultaneously.
  • Threads that are waiting to receive messages must be blocking threads.
  • It provides methods to create Connector objects.

Answer : This interface is intended for all wireless messaging protocols. An application can have both client and server mode MessageConnection instances open simultaneously.

Given: 12. canvas.repaint(x1,y1,wd,ht); 13. canvas.repaint(x2,y2,wd,ht); 14. canvas.serviceRepaints(); Which two are true? (Choose two.)


Options are :

  • paint() is always called twice, once for each repaint() request.
  • If the two regions specified in repaint() overlap, repaint() may attempt to paint the union of the two areas.
  • serviceRepaints() blocks waiting for paint() to return.
  • paint() is called three times, once for each repaint() and once for serviceRepaints().

Answer : If the two regions specified in repaint() overlap, repaint() may attempt to paint the union of the two areas. serviceRepaints() blocks waiting for paint() to return.

Which JAD attribute must be present to begin the MIDlet suite authentication process using X.509 PKI?


Options are :

  • MIDlet-Permission
  • MIDlet-Certificate-n-m
  • MIDlet-Jar-RSA-SHA1
  • MIDlet-Permission-Opt

Answer : MIDlet-Jar-RSA-SHA1

Which two events can result in the removal of a MIDlet's dynamic push connection registration? (Choose two.)


Options are :

  • When the MIDlet is uninstalled.
  • Using a call to PushRegistry.removeConnection().
  • Using a call to PushRegistry.unregisterConnection().
  • When MIDlet.destroyApp() is called

Answer : When the MIDlet is uninstalled. Using a call to PushRegistry.unregisterConnection().

Which method is initially called when the MIDlet starts in response to a push notification?


Options are :

  • MIDlet.resumeRequest()
  • MIDlet.notifyApp()
  • MIDlet.pushApp()
  • MIDlet.startApp()

Answer : MIDlet.startApp()

What is the minimum volatile memory requirement identified by the CLDC 1.1 specification?


Options are :

  • 128 KB
  • 160 KB
  • 64 KB
  • 32 KB

Answer : 32 KB

Which three APIs may untrusted MIDlets use without explicit confirmation by the user? (Choose three.)


Options are :

  • javax.microedition.io.PushRegistry
  • javax.microedition.lcdui
  • javax.microedition.rms
  • javax.microedition.media

Answer : javax.microedition.lcdui javax.microedition.rms javax.microedition.media

How are labels for Command objects displayed to the user?


Options are :

  • The device shows either the short or the long label.
  • The short label is always available to view, while the long label may be displayed occasionally.
  • Both short and long labels are always available for the user to view.
  • The long label is only for description and is never displayed.

Answer : The device shows either the short or the long label.

Which three functions are performed during the preverification process? (Choose three.)


Options are :

  • data type checking
  • augment the StackMap
  • remove certain bytecodes
  • obfuscate the application
  • compress the class file

Answer : data type checking augment the StackMap remove certain bytecodes

A game running on a J2ME device supporting MMAPI needs to play tones in the background of the game. It intermittently needs to play sounds of explosions. The code has created two Player objects: one for tones and one for WAV audio. How does the developer know if both audio streams can be heard simultaneously?


Options are :

  • Playing audio streams simultaneously is NOT possible with any MMAPI implementation.
  • Playing audio streams simultaneously is only a request. The device determines whether to do so.
  • The developer can query the system using System.getProperty("supports.mixing");.
  • The developer knows playing audio streams simultaneously is supported because two Player objects have been created.

Answer : The developer can query the system using System.getProperty("supports.mixing");.

A MIDlet has registered a push connection in the PushRegistry and a connection notification is pushed to the device. Which two are true? (Choose two.)


Options are :

  • If the application is running, it is responsible for all I/O operations associated with the inbound connection.
  • If the MIDlet is NOT running, the Application Management Software starts the MIDlet.
  • If the MIDlet is in the paused state, the Application Management Software is responsible for any inbound notification requests.
  • The Application Management Software is always responsible for any inbound notification requests.

Answer : If the application is running, it is responsible for all I/O operations associated with the inbound connection. If the MIDlet is NOT running, the Application Management Software starts the MIDlet.

A MIDP 2.0 compliant device creates an HTTP connection to a server that supports HTTP 1.1. Which is true?


Options are :

  • The device definitely does NOT support HTTP 1.1.
  • There is no such thing as a 1.1 version of HTTP.
  • The device may or may NOT support HTTP 1.1
  • The device definitely supports HTTP 1.1

Answer : The device definitely supports HTTP 1.1

Which creates a new record store of type javax.microedition.rms.RecordStore that can be shared between MIDlet suites?


Options are :

  • openRecordStore("cust", true, AUTHMODE_SHARED, false);
  • openRecordStore("cust", false, AUTHMODE_ANY, false);
  • openRecordStore("cust", true, AUTHMODE_ANY, false);
  • openRecordStore("cust", false, AUTHMODE_SHARED, false);

Answer : openRecordStore("cust", true, AUTHMODE_ANY, false);

Which is true when using multiple threads to access a record store?


Options are :

  • The implementation coordinates access, ensuring that record stores will NOT be corrupted.
  • You must lock a record store prior to access.
  • You must coordinate access to a record store to prevent data corruption.
  • You CANNOT access a record store with multiple threads.

Answer : You must coordinate access to a record store to prevent data corruption.

Which three are true for ChoiceGroup? (Choose three.)


Options are :

  • Images specified for entries may be mutable or immutable.
  • You can specify different fonts for each ChoiceGroup entry.
  • When using Choice.EXCLUSIVE, there must always be an element selected.
  • You can associate a Command object with a ChoiceGroup.

Answer : Images specified for entries may be mutable or immutable. When using Choice.EXCLUSIVE, there must always be an element selected. You can associate a Command object with a ChoiceGroup.

GSM defines two mechanisms for SMS message concatenation. Which is true?


Options are :

  • JTWI devices must implement both mechanisms for sent messages, and may implement either mechanism for received messages.
  • JTWI devices may implement either mechanism for sent and received messages.
  • JTWI devices must implement both mechanisms for sent and received messages.
  • JTWI devices may implement either mechanism for sent messages, and must implement both mechanisms for received messages.

Answer : JTWI devices may implement either mechanism for sent messages, and must implement both mechanisms for received messages.

A mobile application developer is trying to increase the performance of a game using the MIDP Game API. Which two are legal, valid approaches that fulfill the developer's goal? (Choose two.)


Options are :

  • base collision detection on rectangle boundaries
  • implement keyPressed(), keyReleased(), and keyRepeated()
  • poll for key states only when necessary
  • restrict the number of frames per Sprite to one

Answer : base collision detection on rectangle boundaries poll for key states only when necessary

Which two are true for List? (Choose two.)


Options are :

  • A CommandListener must be registered for the application to recognize user selections in a List.
  • You can add Command objects to a List without registering a CommandListener
  • Images and text in a List CANNOT be changed once the List is created.
  • Traversing and scrolling in a List causes events that can be programmatically detected.

Answer : A CommandListener must be registered for the application to recognize user selections in a List. You can add Command objects to a List without registering a CommandListener

Which two features were introduced in CLDC 1.1? (Choose two.)


Options are :

  • floating number support
  • weak reference support
  • native interface support
  • random number generation

Answer : floating number support weak reference support

Which URL indicates the intention for one JTWI device to communicate with another JTWI device?


Options are :

  • sms://+18005551234
  • cbs://+18005551234:1234
  • cbs://+18005551234
  • sms://+18005551234:1234

Answer : sms://+18005551234:1234

Given the JAD file fragment: MIDlet-1: Calendar, calendar.png, com.example.CalendarMIDlet MIDlet-2: Chat, chat.png, com.example.ChatMIDlet What CalendarMIDlet code launches ChatMIDlet at the time specified by variable chatTime?


Options are :

  • PushRegistry.registerAlarm ("com.example.ChatMIDlet", chatTime);
  • PushRegistry.registerAlarm("Chat", chatTime);
  • PushRegistry.registerAlarm (Class.forName("com.example.ChatMIDlet"), chatTime);
  • PushRegistry.registerAlarm("MIDlet-1", chatTime);

Answer : PushRegistry.registerAlarm ("com.example.ChatMIDlet", chatTime);

Which two media controls are guaranteed to be available to any MIDP 2.0 device? (Choose two.)


Options are :

  • VolumeControl
  • VideoControl
  • PitchControl
  • ToneControl

Answer : VolumeControl ToneControl

A MIDlet suite is signed using X.509 PKI. Which encoding format must be used for the certificate entries in the JAD file?


Options are :

  • Enc
  • base64
  • none
  • binary

Answer : base64

Which three are true? (Choose three.)


Options are :

  • A MIDlet suite is an array of MIDlet objects
  • A MIDlet suite consists of only one JAR file.
  • Different MIDlet suites can share data with each other
  • A MIDlet suite can have more than one class that extends the MIDlet class.

Answer : A MIDlet suite consists of only one JAR file. Different MIDlet suites can share data with each other A MIDlet suite can have more than one class that extends the MIDlet class.

Given a MIDP 2.0 device supports alpha blending, a MIDlet needs to render semitransparent images of size 10x10 pixels. However, these images need to be generated at runtime. That is, they CANNOT be loaded as PNGs. What is the correct way to create a 10x10, red, semi-transparent image, using only the MIDP 2.0 API?


Options are :

  • use createRGBImage() to create an immutable Image from ARGB data with the desired values
  • use createImage() to create a mutable Image, then fill it with red pixels
  • This is not possible. An Image with semi-transparency CANNOT be created at runtime.
  • use createImage() to create a mutable Image; first fill it with white pixels, then fill it with red pixels

Answer : use createRGBImage() to create an immutable Image from ARGB data with the desired values

Which two can the developer define for a TextField? (Choose two.)


Options are :

  • shape
  • input constraints
  • color
  • font
  • maximum number of characters

Answer : input constraints maximum number of characters

Which two events can result in the removal of a MIDlet's dynamic push connection registration? (Choose two.)


Options are :

  • Using a call to PushRegistry.unregisterConnection().
  • When MIDlet.destroyApp() is called
  • Opening the connection using Connector.open().
  • When the MIDlet is uninstalled.

Answer : Using a call to PushRegistry.unregisterConnection(). When the MIDlet is uninstalled.

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?


Options are :

  • The Sprites are rendered in order of descending index.
  • The Sprites are rendered in an implementation specific manner.
  • The Sprites are rendered in a random order.
  • The Sprites that are animated are rendered first

Answer : The Sprites are rendered in order of descending index.

When using X.509 PKI, where must a MIDlet suite's security certificates be placed?


Options are :

  • inlined in the JAD, using a base64 encoding
  • in .cer files in the JAR's META-INF directory
  • inlined in the JAR manifest, using a base64 encoding
  • in a user-defined subclass of SecurityInfo in the JAR's META-INF directory

Answer : inlined in the JAD, using a base64 encoding

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions