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

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


Options are :

  • 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 does NOT support HTTP 1.1.
  • The device definitely supports HTTP 1.1.

Answer : The device definitely supports HTTP 1.1.

The binding of networking protocols to a MIDlet at runtime can be compared to a type of relationship. Which relationship most closely matches the binding?


Options are :

  • specification and implementation
  • mark and sweep
  • application and device drivers
  • caller and callee

Answer : application and device drivers

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

Which two are true about the MIDlet suite discovery process? (Choose two.)


Options are :

  • The discovery of a MIDlet suite is the process by which a user installs a MIDlet suite on a JTWI-compliant device.
  • The Application Descriptor is used by the Application Management Software to determine if a MIDlet suite can be successfully installed and executed on the device.
  • The MIDlet suite discovery process always begins with the download of an Application Descriptor file with a .jad extension.
  • The discovery of a MIDlet suite is the process by which a user locates a MIDlet suite using a JTWI-compliant device.

Answer : The Application Descriptor is used by the Application Management Software to determine if a MIDlet suite can be successfully installed and executed on the device. The discovery of a MIDlet suite is the process by which a user locates a MIDlet suite using a JTWI-compliant device.

Which two are true about the MIDP user interface API? (Choose two.)


Options are :

  • Form is a multicast event source for CommandListener objects.
  • Canvas is a subclass of Screen.
  • All UI events are sent to the application asynchronously
  • A single Command can have both a long and a short label.
  • There can be only one Display object per MIDlet

Answer : A single Command can have both a long and a short label. There can be only one Display object per MIDlet

Given: DatagramConnection dConnection = (DatagramConnection) Connector.open("datagram://:9009"); Which is true?


Options are :

  • A client mode datagram connection is created only for sending datagrams.
  • A server mode datagram connection is created for both sending and receiving datagrams by way of the same port.
  • A server mode datagram connection is created for both sending and receiving datagrams using different ports.
  • A client mode datagram connection is created for receiving datagrams.

Answer : A server mode datagram connection is created for both sending and receiving datagrams by way of the same port.

Which is true regarding the javax.wireless.messaging package?


Options are :

  • The messaging protocols that use this API are typically store-and-forward.
  • This API is designed to run exclusively on the GSM SMS protocol.
  • Message objects are assumed always to be blocks of binary data.
  • Messages are usually lost if the recipient is not connected at the time of sending.

Answer : The messaging protocols that use this API are typically store-and-forward.

Which two HttpConnection methods transition the connection to the connected state? (Choose two.)


Options are :

  • openInputStream
  • setRequestMethod
  • getRequestProperty
  • getLength

Answer : openInputStream getLength

Given a class named MyCanvas, which three CANNOT be used if MyCanvas is a direct subclass of Canvas? (Choose three.)


Options are :

  • keyStates = getKeyStates(); if ((keyStates & LEFT_PRESSED) != 0) { }
  • isDoubleBuffered();
  • flushGraphics();
  • public MyCanvas(boolean t) { super(true); }
  • gameAction = getGameAction(keyCode) { }
  • Sprite s = new Sprite(anImage, 20,20);

Answer : keyStates = getKeyStates(); if ((keyStates & LEFT_PRESSED) != 0) { } flushGraphics(); public MyCanvas(boolean t) { super(true); }

What is the area that the developer must paint when using CustomItem?


Options are :

  • CustomItem is limited to painting in the content area
  • CustomItem size is always honored by the system. Once created, the CustomItem always has this area to paint in.
  • CustomItem must paint the content area, its labels, and its border.
  • The areas are unlimited. CustomItem may paint inside any area on the screen.

Answer : CustomItem is limited to painting in the content area

A MIDlet is written to use the media features available in MIDP 2.0. What change is required to use the MIDlet on a device that supports the full MMAPI?


Options are :

  • The MIDlet CANNOT be used under MMAPI.
  • The creation of Player objects must be modified.
  • Any tone generation code should be removed
  • No change is necessary. The MIDP's media API is a proper subset of MMAPI.

Answer : No change is necessary. The MIDP's media API is a proper subset of MMAPI.

Which three dimensions of a standard-size application does the JTWI 1.0 specification define? (Choose three.)


Options are :

  • RMS data size
  • heap size
  • JAR size
  • screen size
  • JAD size

Answer : RMS data size JAR size JAD size

What is the minimum number of simultaneously running threads that a JTWI 1.0 device must support for each MIDlet suite?


Options are :

  • 1
  • 10
  • 3
  • two running threads for each class of the MIDlet suite

Answer : 10

Which three statements are true regarding the handling of wireless connections? (Choose three.)


Options are :

  • Devices can only support one HttpConnection at a time; therefore, network access from multiple threads must be serialized.
  • A network connection could interfere with other services on the device, such as the ability to receive phone calls or SMS on a phone.
  • Network connections should never be performed on a separate thread, so problems can be handled quickly
  • Performing network operations on the same thread used by the display is likely to block refreshes of the display until the network operations complete.
  • The connection could unexpectedly terminate while processing the input or output streams.

Answer : A network connection could interfere with other services on the device, such as the ability to receive phone calls or SMS on a phone. Performing network operations on the same thread used by the display is likely to block refreshes of the display until the network operations complete. The connection could unexpectedly terminate while processing the input or output streams.

A MIDlet suite running on a GSM phone successfully receives an SMS text message msg from another GSM phone. The suite is using a valid SMS MessageConnection object conn opened in server mode. The suite tries to respond back using: msg.setPayloadText("thank you!"); conn.send(msg); Which is true?


Options are :

  • The code can succeed because the message object contains an address for sending a response.
  • The code always fails because the connection object is missing an address for sending a response.
  • The code can succeed because the connection object contains an address for sending a response.
  • The code always fails because the message object is missing an address for sending a response.

Answer : The code can succeed because the message object contains an address for sending a response.

Which two are true? (Choose two.)


Options are :

  • MIDP 2.0 is a set of APIs that runs on top of the CLDC.
  • The goal of the CLDC is to guarantee portability and interoperability between various types of resource-constrained devices.
  • The J2SE specification extends the MIDP specification.
  • WMA provides a set of APIs for multimedia content handling.

Answer : MIDP 2.0 is a set of APIs that runs on top of the CLDC. The goal of the CLDC is to guarantee portability and interoperability between various types of resource-constrained devices.

Which two are true about record stores? (Choose two.)


Options are :

  • A record store's authorization mode can be set only when the record store is created.
  • The RecordStore class provides a method that returns a list of record stores in the MIDlet suite.
  • For a given enumerator, multiple filters can exist
  • For a given record store, multiple comparators can exist.

Answer : The RecordStore class provides a method that returns a list of record stores in the MIDlet suite. For a given record store, multiple comparators can exist.

What is the minimum configuration that JTWI 1.0 requires?


Options are :

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

Answer : CLDC 1.0

What is the result if a call to serviceRepaints() triggers a separate thread to invoke paint()?


Options are :

  • MIDP is thread-safe. There will never be a deadlock.
  • The system may deadlock if the caller to serviceRepaints() holds a lock that is also needed by paint().
  • An exception is thrown at runtime.
  • A deadlock always occurs.

Answer : The system may deadlock if the caller to serviceRepaints() holds a lock that is also needed by paint().

Which three methods can be used by a MIDlet to communicate with the Application Management Software? (Choose three.)


Options are :

  • destroyApp()
  • notifyPaused()
  • pauseApp()
  • notifyDestroyed()
  • getAppProperty()

Answer : notifyPaused() notifyDestroyed() getAppProperty()

Which image format(s) must be supported by a JTWI 1.0 compliant device for Image object creation?


Options are :

  • JPEG and GIF
  • PNG and JPEG
  • PNG only
  • TIFF and PNG

Answer : PNG and JPEG

Which method in javax.microedition.midlet.MIDlet is used to retrieve the attributes necessary to access a record store in a different MIDlet suite?


Options are :

  • getAttribute()
  • getAppProperty()
  • getProperty()
  • checkPermission()

Answer : getAppProperty()

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 HTML file.
  • The file is interpreted as an ASCII file.
  • player is set to null
  • An exception is thrown at runtime.

Answer : An exception is thrown at runtime.

Which guarantees the application can be installed without push registration conflicts?


Options are :

  • The MIDlet tries to register the connection dynamically after installation.
  • The MIDlet specifies multiple push registration strings in the JAD.
  • It is NOT the responsibility of the MIDlet to resolve these conflicts. The installer does this automatically
  • The MIDlet specifies the push registration in the JAD, but will register dynamically if there is a conflict.

Answer : The MIDlet tries to register the connection dynamically after installation.

Which two are true regarding record stores? (Choose two.)


Options are :

  • MIDlets within the same suite can access the record stores of other MIDlets in the same suite.
  • The first created in a record store has a record ID of 1.
  • Record stores can be locked.
  • Record store names are case insensitive.

Answer : MIDlets within the same suite can access the record stores of other MIDlets in the same suite. The first created in a record store has a record ID of 1.

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


Options are :

  • The payload for an SMS message can use the BinaryMessage interface
  • The payload for an SMS message segment CANNOT exceed 140 bytes.
  • . 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

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

Which is true about a Ticker object?


Options are :

  • Direction and speed of scrolling can be controlled through methods in the API.
  • A Ticker may be shared by several Displayable objects.
  • Ticker is a subclass of Screen.
  • The Ticker can be started and stopped through methods in the API.

Answer : A Ticker may be shared by several Displayable objects.

Which interaction generates an application event in a MIDlet that uses only high-level APIs?


Options are :

  • making a choice in a multiple choice List
  • scrolling
  • navigation
  • responding to a command

Answer : responding to a command

Which two are true regarding a device that implements JTWI? (Choose two.)


Options are :

  • The device is NOT required to implement all of the MIDP 2.0 API as identified by the MIDP 2.0 specification.
  • The device must implement at least the lowest version of the API as identified by the JTWI specification.
  • The device must implement the highest version of the API as identified by the JTWI specification.
  • The device may implement a higher version of the API as identified by the JTWI specification.

Answer : The device must implement at least the lowest version of the API as identified by the JTWI specification. The device may implement a higher version of the API as identified by the JTWI specification.

What are two benefits of the PushRegistry? (Choose two.)


Options are :

  • It provides a way to restrict HTTP connections to well-known network addresses
  • It provides a way for the AMS to automatically invoke a MIDlet at a specified time if it is not already running.
  • It provides a way for two MIDlet suites running on the same device to discover and communicate with each other in a secure manner.
  • It provides a way for an incoming connection to invoke a MIDlet that can handle the content sent by the connection.

Answer : It provides a way for the AMS to automatically invoke a MIDlet at a specified time if it is not already running. It provides a way for an incoming connection to invoke a MIDlet that can handle the content sent by the connection.

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


Options are :

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

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

Given: Layer heroShip = aLayerManager.getLayerAt(0); Which is true?


Options are :

  • An IllegalArgumentException is thrown.
  • An ArrayIndexOutOfBoundsException is thrown
  • The getLayerAt() is not a valid method of the LayerManager class.
  • The heroShip is assigned to the Layer object located at index 0.

Answer : The heroShip is assigned to the Layer object located at index 0.

In the JTWI 1.0 specification, what is the recommended screen size as returned by Canvas.getHeight() and Canvas.getWidth(), when in full screen mode?


Options are :

  • 96x54 pixels
  • 125x125 pixels
  • 320x240 pixels
  • 176x208 pixels

Answer : 125x125 pixels

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


Options are :

  • If the record store is open, an exception will be thrown.
  • The record store must be open prior to calling deleteRecordStore().
  • For any registered listener of the record store, recordDeleted() will be called.
  • The record store must be closed 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 is true about PushRegistry.registerAlarm()?


Options are :

  • PushRegistry.registerAlarm() works independently of the network protocols available for push connections.
  • PushRegistry.registerAlarm() is overloaded to play audio file arguments.
  • JTWI devices may choose NOT to implement PushRegistry.registerAlarm().
  • PushRegistry.registerAlarm() supports several outstanding activation times per MIDlet.

Answer : PushRegistry.registerAlarm() works independently of the network protocols available for push connections.

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_ANY, false);
  • openRecordStore("cust", false, AUTHMODE_ANY, false);
  • openRecordStore("cust", false, AUTHMODE_SHARED, false);
  • openRecordStore("cust", true, AUTHMODE_SHARED, false);

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

Assuming an application descriptor contains: MIDlet-Data-Size: 4096 Which is true?


Options are :

  • The device will use 4096 bytes to buffer data the application sends over the network
  • The device will permanently reserve 4096 bytes of heap space for the application.
  • The device will use 4096 bytes to buffer data the application receives over the network.
  • The device will permanently reserve 4096 bytes of RMS space for the application.

Answer : The device will permanently reserve 4096 bytes of RMS space for the application.

Due to possible performance consequences, the MIDP 2.0 specification urges caution when creating certain types of record store enumerations. Which is identified in the specification as having the greatest probability of resulting in poor response time?


Options are :

  • using a filter and a comparator together
  • setting the keepUpdated argument to true
  • using a filter
  • using a comparator

Answer : setting the keepUpdated argument to true

What is the minimum number of simultaneously running threads that a JTWI 1.0 device must support for each MIDlet suite?


Options are :

  • 1
  • 10
  • two running threads for each class of the MIDlet suite
  • 3

Answer : 10

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


Options are :

  • Permission to delete a record store is independent of its authorization mode.
  • Record stores accessible across MIDlet suites can never be deleted.
  • A record store can be deleted by any MIDlet that has access to it.
  • Any attempt to delete a record store can throw an exception that must be caught.

Answer : Permission to delete a record store is independent of its authorization mode. Any attempt to delete a record store can throw an exception that must be caught.

Which guarantees the application can be installed without push registration conflicts?


Options are :

  • The MIDlet specifies multiple push registration strings in the JAD
  • It is NOT the responsibility of the MIDlet to resolve these conflicts. The installer does this automatically.
  • The MIDlet tries to register the connection dynamically after installation.
  • The MIDlet specifies the push registration in the JAD, but will register dynamically if there is a conflict.

Answer : The MIDlet tries to register the connection dynamically after installation.

Which is true regarding access of the manifest file in a MIDlet suite's JAR file?


Options are :

  • The manifest file can be accessed by only one authorized MIDlet in every suite.
  • The manifest file is hidden from MIDlets and CANNOT be accessed.
  • The manifest file can be accessed only by using MIDlet.getAppProperty().
  • The manifest file can be accessed by any class using Class.getResourceAsStream().

Answer : The manifest file can be accessed by any class using Class.getResourceAsStream().

Which two are true regarding a device that implements JTWI? (Choose two.)


Options are :

  • The device is NOT required to implement all of the MIDP 2.0 API as identified by the MIDP 2.0 specification.
  • The device must implement the highest version of the API as identified by the JTWI specification.
  • The device must implement at least the lowest version of the API as identified by the JTWI specification.
  • The device may implement a higher version of the API as identified by the JTWI specification.

Answer : The device must implement at least the lowest version of the API as identified by the JTWI specification. The device may implement a higher version of the API as identified by the JTWI specification.

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


Options are :

  • 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.
  • The set of error classes is essentially the same in CLDC and J2SE.
  • If a class throws an error in CLDC, it should throw the same error as in J2SE or its nearest superclass.

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

Which is true regarding CLDC?


Options are :

  • A CLDC implementation must provide at least one optional feature.
  • A CLDC implementation can provide features that are optional.
  • A CLDC implementation generally defines a superset of J2SE technology.
  • A CLDC implementation CANNOT provide features that are optional.

Answer : A CLDC implementation CANNOT provide features that are optional.

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


Options are :

  • in .cer files in the JAR's META-INF directory
  • inlined in the JAR manifest, using a base64 encoding
  • inlined in the JAD, 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