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

Which object or objects must be created to generate a simple tone?


Options are :

  • A Player must be created.
  • A Player and a PlayerListener must be created.
  • A Player and ToneControl must be created
  • None. Manager can be used to generate a simple tone.

Answer : None. Manager can be used to generate a simple tone.

Which two clarifications does the JTWI specification make regarding how devices implement the Mobile Media API? (Choose two.)


Options are :

  • A JTWI device must support MIDI file playback.
  • A JTWI device must support MP3 file playback.
  • A JTWI device must support WAV file playback.
  • A JTWI device must support HTTP for media file download of all supported media formats.

Answer : A JTWI device must support MIDI file playback. A JTWI device must support HTTP for media file download of all supported media formats.

Which is true about CLDC support for accessing system property information?


Options are :

  • CLDC supports a subset of java.util.Properties.
  • Full support for java.util.Properties is available within CLDC.
  • Property information is available in CLDC using System.getProperty().
  • CLDC supports a subset of java.util.Properties and also provides additional property information using System.getProperty().

Answer : Property information is available in CLDC using System.getProperty().

Which two are true about sockets and datagrams? (Choose two.)


Options are :

  • Datagrams are guaranteed to reach their intended destination.
  • A datagram is an independent, self-contained message sent over the network.
  • Data sent over a TCP/IP socket is received in the same order that it was sent.
  • Datagrams are used to send packets of data over a SocketConnection.

Answer : A datagram is an independent, self-contained message sent over the network. Data sent over a TCP/IP socket is received in the same order that it was sent.

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


Options are :

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

Answer : MessageConnection does NOT support InputStream objects

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


Options are :

  • It provides a way for an incoming connection to invoke a MIDlet that can handle the content sent by the connection.
  • 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 to restrict HTTP connections to well-known network addresses
  • It provides a way for two MIDlet suites running on the same device to discover and communicate with each other in a secure manner.

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

Given: DateField df = new DateField("Date", DateField.DATE_TIME); Which requests the width of df to fill available screen space?


Options are :

  • df.setLayout(Item.LAYOUT_RIGHT);
  • df.setLayout(Item.LAYOUT_FULL);
  • df.setLayout(Item.LAYOUT_EXPAND);
  • df.setLayout(Item.LAYOUT_MAXIMUM);

Answer : df.setLayout(Item.LAYOUT_EXPAND);

Which two specifications are mandatory in JTWI 1.0? (Choose two.)


Options are :

  • MMAPI 1.1
  • WMA 1.1
  • MIDP 2.0
  • WMA 1.0

Answer : WMA 1.1 MIDP 2.0

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


Options are :

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

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

What is TimeBase?


Options are :

  • a MIDP 2.0 interface extending the Control interface
  • a top-level MMAPI interface
  • a top-level MIDP 2.0 interface
  • an MMAPI class implementing the Control interface

Answer : a top-level MMAPI interface

How does a TiledLayer determine the sequence of frames in animated tiles?


Options are :

  • They CANNOT be set. Animation is possible only with a Sprite
  • The tile to be displayed must be set during each frame of the animation.
  • The sequence of frames is obtained from the location in the source image.
  • The sequence of frames is obtained from an animated Sprite.

Answer : The tile to be displayed must be set during each frame of the animation.

Which two clarifications does the JTWI specification make regarding how devices implement the Mobile Media API? (Choose two.)


Options are :

  • A JTWI device must support MP3 file playback.
  • A JTWI device must support MIDI file playback
  • A JTWI device must support HTTP for media file download of all supported media formats.
  • A JTWI device must support WAV file playback.

Answer : A JTWI device must support MIDI file playback A JTWI device must support HTTP for media file download of all supported media formats.

Given the push connection string: MIDlet-Push-1: socket://:79, com.sun.example.SampleChat, 192.3?.?.* Which two addresses are allowed to push connection notifications to the application? (Choose two.)


Options are :

  • 192.3.1.101
  • 192.31.1.1
  • 192.31.101.1
  • 192.32.1.101

Answer : 192.31.1.1 192.32.1.101

Which arguments should be passed to Connector.open() and TextMessage.setAddress(), respectively, to initiate an SMS text message using a server connection?


Options are :

  • sms://:1234 and sms://+18005551234
  • sms://:1234, with no need to call setAddress()
  • sms://+18005551234, with no need to call setAddress()
  • sms://+18005551234 and sms://:1234

Answer : sms://:1234 and sms://+18005551234

When a LayerManager is rendered, the contents of its Sprite objects and TiledLayer objects are rendered using their position information. How are those areas of the LayerManager that are not occupied by a Sprite or TiledLayer rendered?


Options are :

  • They CANNOT be rendered. The developer must ensure that these lie outside of the clip region.
  • The pixels in the destination are left untouched.
  • The pixels in the destination are painted with Display.COLOR_BACKGROUND.
  • The pixels in the destination are painted white.

Answer : The pixels in the destination are left untouched.

What action can the device take when some Item objects on a Form do NOT fit when displayed?


Options are :

  • delete the extra Item objects
  • display a runtime error
  • create an additional screen
  • create a vertical scroll bar

Answer : create a vertical scroll bar

Which three are goals of the CLDC specification? (Choose three.)


Options are :

  • It allows device manufacturers to build more extensible devices.
  • It is intended as a systems programming environment.
  • It is intended to be an application development platform.
  • It does NOT provide device-specific APIs.

Answer : It allows device manufacturers to build more extensible devices. It is intended to be an application development platform. It does NOT provide device-specific APIs.

How would a MIDlet that uses a GameCanvas efficiently update only a small region of the screen, from the data in the off-screen buffer?


Options are :

  • call serviceRepaints() and set a clip region on the Graphics object in paint()
  • call flushGraphics(int, int, int, int) that specifies the region to be flushed
  • Pixels that are NOT to be flushed should be made transparent.
  • write extra code to coalesce the flushGraphics() calls over many loops into one call

Answer : call flushGraphics(int, int, int, int) that specifies the region to be flushed

Which three are basic interface types addressed by the Generic Connection Framework? (Choose three.)


Options are :

  • basic serial input connection
  • location-oriented mechanism
  • circuit-oriented mechanism
  • basic serial output connection

Answer : basic serial input connection circuit-oriented mechanism basic serial output connection

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
  • use createImage() to create a mutable Image; first fill it with white pixels, then fill it with red pixels
  • This is not possible. An Image with semi-transparency CANNOT be created at runtime.

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

Assume a device supports datagrams and a MIDlet has permission to use datagram connections. Which two are true? (Choose two.)


Options are :

  • Push registration can fail because the device does NOT support the use of datagrams by the PushRegistry.
  • Push registration can fail if another application has already reserved the connection on the device.
  • Push registration can fail if there is a push registration conflict, but the user must be prompted as to how to resolve the problem.
  • Push registration can fail if the allowed sender filter specified is *, which poses a security risk to the device.

Answer : Push registration can fail because the device does NOT support the use of datagrams by the PushRegistry. Push registration can fail if another application has already reserved the connection on the device.

Assume a particular JTWI phone supports server socket connections. A MIDlet running on the phone attempts to register a connection using: PushRegistry.registerConnection(connection, midlet, filter); Assume connection, midlet, and filter are NOT null. The statement is executed and throws a ConnectionNotFoundException. What causes the exception?


Options are :

  • The syntax of connection is invalid.
  • The specified MIDlet does NOT exist.
  • The phone does NOT support push connections using server sockets.
  • The requested connection is already registered.

Answer : The phone does NOT support push connections using server sockets.

Manager.createPlayer(..) may involve synchronous blocking I/O operations, possibly blocking execution for an indefinite amount of time. Which is the most efficient way to create a Player object and receive the events it generates?


Options are :

  • Create the Player in the current thread and listen for events in a separate thread.
  • Create the Player in a separate thread from the user interface, then create a PlayerListener that receives events from this Player.
  • Create the Player from an InputStream, possibly after copying data into memory.
  • Ensure System.gc() is called before creating the Player.

Answer : Create the Player in a separate thread from the user interface, then create a PlayerListener that receives events from this Player.

Which two are true? (Choose two.)


Options are :

  • The J2SE specification extends the MIDP specification.
  • 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.
  • 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.

A MIDlet suite has the application descriptor fragment: MIDlet-1: E-mail, email.png, com.example.EmailMIDlet The MIDlet suite has the necessary permissions to use the PushRegistry. What line does the application descriptor need to register the MIDlet suite for socket push connections on port 79?


Options are :

  • MIDlet-Push-1: socket://:79, MIDlet-1, *
  • MIDlet-Push-1: socket://:79, E-mail, *
  • MIDlet-Push-1: socket://:79, com.example.EmailMIDlet, *
  • MIDlet-Push-1: socket://:79, EmailMIDlet, *

Answer : MIDlet-Push-1: socket://:79, com.example.EmailMIDlet, *

There are different variants of opening a socket connection with the Generic Connection Framework. Which three are valid? (Choose three.)


Options are :

  • Connection conn = Connector.open("socket://");
  • Connection conn = Connector.open("socket://java.sun.com:80");
  • Connection conn = Connector.open("socket");
  • Connection conn = Connector.open("socket://java.sun.com");
  • Connection conn = Connector.open("socket::java.sun.com");

Answer : Connection conn = Connector.open("socket://"); Connection conn = Connector.open("socket://java.sun.com:80"); Connection conn = Connector.open("socket://java.sun.com");

Which three are defined as user interaction permission modes? (Choose three.)


Options are :

  • oneshot
  • global
  • session
  • blanket

Answer : oneshot session blanket

Which two are true about errors and exceptions in a CLDC-compliant virtual machine? (Choose two.)


Options are :

  • A CLDC-compliant virtual machine must NOT throw a VirtualMachineError.
  • Developers are NOT allowed to handle errors
  • Developers do NOT receive asynchronous exceptions from a CLDC-compliant virtual machine.
  • Developers must throw only checked (non-runtime) exceptions
  • Rather than throwing the Error class specified by the Java Language Specification, the CLDC-compliant virtual machine may throw a CLDC-supported superclass.

Answer : Developers do NOT receive asynchronous exceptions from a CLDC-compliant virtual machine. Rather than throwing the Error class specified by the Java Language Specification, the CLDC-compliant virtual machine may throw a CLDC-supported superclass.

Which two are true about Gauge? (Choose two.)


Options are :

  • The visual appearance of a Gauge is determined by the device implementation.
  • The current value of a Gauge CANNOT be set programmatically.
  • You must specify both the initial and maximum values when creating a Gauge.
  • The range of values displayed by the implementation always matches the range of values specified by the application.

Answer : The visual appearance of a Gauge is determined by the device implementation. You must specify both the initial and maximum values when creating a Gauge.

Which two errors are available in CLDC? (Choose two.)


Options are :

  • java.lang.StackOverflowError
  • java.lang.OutOfMemoryError
  • java.lang.UnknownError
  • java.lang.VirtualMachineError

Answer : java.lang.OutOfMemoryError java.lang.VirtualMachineError

Which is true about the installation status report definition?


Options are :

  • A MIDlet suite CANNOT be removed until the installation notification has been successfully sent and the acknowledgement has been received.
  • The only protocols supported for the status report notification are HTTP and UDP.
  • If the installation status report CANNOT be sent, the device must refuse the installation of the MIDlet suite.
  • In response to an installation status report, the server must reply with a 200 OK. HTTP acknowledgement response.

Answer : In response to an installation status report, the server must reply with a 200 OK. HTTP acknowledgement response.

What is the minimum number of received SMS messages that a JTWI device must be able to concatenate?


Options are :

  • 10
  • 32
  • 3
  • 5

Answer : 3

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


Options are :

  • The connection could unexpectedly terminate while processing the input or output streams.
  • 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.
  • Network connections should never be performed on a separate thread, so problems can be handled quickly.

Answer : The connection could unexpectedly terminate while processing the input or output streams. 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.

What is guaranteed by CLDC regarding time zones?


Options are :

  • GMT and UTC must be supported.
  • The local time zone is always supported.
  • UTC is always supported.
  • At least one time zone must be supported.

Answer : At least one time zone must be supported.

Which is true about CLDC support for accessing system property information?


Options are :

  • CLDC supports a subset of java.util.Properties.
  • Property information is available in CLDC using System.getProperty().
  • CLDC supports a subset of java.util.Properties and also provides additional property information using System.getProperty().
  • Full support for java.util.Properties is available within CLDC.

Answer : Property information is available in CLDC using System.getProperty().

Which is true about WMA's support for Cell Broadcast Service (CBS) messaging?


Options are :

  • The WMA is used to send and receive CBS messages.
  • A base station can choose to send CBS messages to specific mobile stations.
  • CBS uses encoding schemes different from SMS.
  • A subscriber can choose topics on which to receive messages.

Answer : A subscriber can choose topics on which to receive messages.

Which is true about the process of updating a MIDlet suite in a JTWI-compliant device?


Options are :

  • A MIDlet suite CANNOT be updated with another MIDlet suite that has a lower value for the MIDlet-Version attribute
  • An unsigned MIDlet suite must NOT be allowed to update a signed MIDlet suite.
  • A MIDlet suite CANNOT be updated with the same MIDlet suite from a different URL.
  • The RMS record stores of the updated MIDlet suite are always lost

Answer : An unsigned MIDlet suite must NOT be allowed to update a signed MIDlet suite.

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


Options are :

  • Listeners are notified if a record store is deleted.
  • A record store can have more than one registered listener.
  • When a record store is closed, listeners are removed.
  • A record store can have only one registered listener.

Answer : A record store can have more than one registered listener. When a record store is closed, listeners are removed.

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions