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

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


Options are :

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

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

A JTWI application sends a text message using the code: message.setPayloadText("hello world!"); conn.send(message); What exception will this code throw if a timeout occurs while trying to send the message?


Options are :

  • java.io.InterruptedIOException
  • java.io.EOFException
  • java.lang.NullPointerException
  • java.lang.SecurityException

Answer : java.io.InterruptedIOException

Which two are true about MIDlet suite provisioning? (Choose two.)


Options are :

  • A JTWI-compliant device must support HTTP 1.1 and cookies
  • A JTWI-compliant device must support HTTP authentication
  • A JTWI-compliant device must support HTTP 1.0.
  • A JTWI-compliant device must support HTTP 1.1.

Answer : A JTWI-compliant device must support HTTP authentication A JTWI-compliant device must support HTTP 1.1.

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

Which two are true regarding the interaction of the Application Management Software (AMS) and a MIDlet when a connection notification is pushed to a device? (Choose two.)


Options are :

  • If the notification is for a socket, the connection must be provided to the MIDlet. However the server side of the connection may timeout before the MIDlet actually starts
  • If the AMS starts a MIDlet in response to an inbound connection, the MIDlet must defer the responsibility of closing the connection to the AMS to prevent an IOException from occurring.
  • If the notification is for a datagram, the AMS must guarantee that the datagram is made available to the MIDlet after the MIDlet is invoked. However, additional datagrams could be lost during the time required to start the MIDlet.
  • There are no guarantees provided by the AMS as to the state of a datagram or socket connection. The connection notification is intended to start the MIDlet to handle subsequent connections.

Answer : If the notification is for a socket, the connection must be provided to the MIDlet. However the server side of the connection may timeout before the MIDlet actually starts If the notification is for a datagram, the AMS must guarantee that the datagram is made available to the MIDlet after the MIDlet is invoked. However, additional datagrams could be lost during the time required to start the MIDlet.

Which is true regarding Timer objects?


Options are :

  • Multiple threads can share a single Timer object only by using external synchronization.
  • Multiple threads can never share a single Timer object.
  • A thread CANNOT stop a Timer object if it is executing a task
  • Multiple threads can share a single Timer object without using external synchronization.

Answer : Multiple threads can share a single Timer object without using external synchronization.

Given a MIDlet that specifies a push registration in the JAD file as: MIDlet-Push-1: socket://:79, com.sun.example.SampleChat, * What is the result when the MIDlet is installed onto a device where another MIDlet has already registered the exact same push connection in the PushRegistry?


Options are :

  • The MIDlet installs and overwrites any existing push registrations.
  • The MIDlet installs, but the connection CANNOT be used.
  • The MIDlet installation is aborted and the user is notified of the problem.
  • The connection can only apply to the currently running MIDlet

Answer : The MIDlet installation is aborted and the user is notified of the problem.

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

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


Options are :

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

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

Which four are direct subclasses of Screen? (Choose four.)


Options are :

  • Form
  • TextBox
  • List
  • Alert

Answer : Form TextBox List Alert

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


Options are :

  • An exception is thrown at runtime.
  • A deadlock always occurs.
  • 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().

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

Which classes and interfaces are available in CLDC?


Options are :

  • List, Set, Vector, Hashtable
  • Vector, Hashtable, Iterator
  • Vector, Hashtable, Stack, Enumeration
  • List, ArrayList, Vector, Hashtable, HashSet

Answer : Vector, Hashtable, Stack, Enumeration

A MIDlet makes its only attempt to register a push connection on a JTWI device using: PushRegistry.registerConnection( "datagram://:79", midlet, "10.0.0.???"); Which is true?


Options are :

  • The MIDlet accepts datagram push connections on port 79 only from IP addresses in the range 10.0.0.0 to 10.0.0.255.
  • The call to registerConnection() causes an exception, because the string 10.0.0.??? is an illegal argument
  • The MIDlet accepts datagram push connections on port 79 only from IP addresses in the range 10.0.0.100 to 10.0.0.255 and on any other port from IP addresses other than those in the range 10.0.0.100 to 10.0.0.255.
  • The MIDlet accepts datagram push connections on port 79 only from IP addresses in the range 10.0.0.100 to 10.0.0.255.

Answer : The MIDlet accepts datagram push connections on port 79 only from IP addresses in the range 10.0.0.100 to 10.0.0.255.

Which two are true about developing a MIDP 2.0-compliant user interface? (Choose two.)


Options are :

  • . Canvas is considered part of the low-level user interface API
  • Double-buffering is not guaranteed when using Canvas.
  • Command instances are always mapped to soft buttons on the device.
  • TextBox is not a portable UI Displayable.

Answer : . Canvas is considered part of the low-level user interface API Double-buffering is not guaranteed when using Canvas.

Which is a method of ToneControl?


Options are :

  • setSequence()
  • setLevel()
  • playTone()
  • startPlayback()

Answer : setSequence()

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
  • Datagrams are used to send packets of data over a SocketConnection.
  • Data sent over a TCP/IP socket is received in the same order that it was sent.

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.

A MIDlet needs to receive incoming socket push notifications. It requests only the permissions: javax.microedition.io.PushRegistry javax.microedition.io.Connector.socket javax.microedition.io.Connector.serversocket Which is true?


Options are :

  • The MIDlet CANNOT receive incoming socket push notifications without the permission javax.microedition.io.Connector.socketreceiver.
  • When an incoming socket connection activates the MIDlet, the MIDlet may be unable to retrieve that connection while starting up.
  • When an incoming socket connection activates the MIDlet, the MIDlet can always retrieve that connection while starting up.
  • When an incoming socket connection activates the MIDlet, the MIDlet will always be unable to retrieve that connection while starting up.

Answer : When an incoming socket connection activates the MIDlet, the MIDlet may be unable to retrieve that connection while starting up.

A MIDlet that is to be installed on a phone has different values for the MIDlet-Name property between the JAD file and the manifest in the JAR file. Which is true?


Options are :

  • The value in the JAD file overrides the value in the manifest.
  • A dialog is presented to resolve the conflict.
  • The MIDlet installation process will be aborted
  • The value in the manifest overrides the value in the JAD file.

Answer : The MIDlet installation process will be aborted

Which is false about untrusted MIDlet suites?


Options are :

  • 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.
  • Untrusted MIDlet suites may access protected APIs or functions if given explicit user permission.
  • JTWI devices must treat all MIDP 1.0 suites as untrusted.

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

Which two guarantee a wireless message will be removed from the incoming message buffer by the Application Management Software? (Choose two.)


Options are :

  • The message does NOT pass the filter defined in the connection URL
  • The incoming message buffer is full.
  • The user denies permission to execute the application.
  • The application has processed the incoming message.

Answer : The message does NOT pass the filter defined in the connection URL The application has processed the incoming message.

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


Options are :

  • The API does NOT provide locking operations for record stores
  • A MIDlet CANNOT access a given record store using multiple simultaneous threads.
  • Record store names are case sensitive
  • MIDlet suites that contain shared record stores are identified by using attributes from that suite's JAR file.

Answer : The API does NOT provide locking operations for record stores Record store names are case sensitive

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 if the allowed sender filter specified is *, which poses a security risk to the device.
  • 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 because the device does NOT support the use of datagrams by the PushRegistry.

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

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 :

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

Answer : application and device drivers

Which is true for Item?


Options are :

  • When adding a Command to an Item, specifying a command type other than Command.ITEM results in a compilation failure.
  • The same Command may occur on more than one Item.
  • The same Item may be appended to more than one Form at the same time.
  • Minimum and preferred size CANNOT be changed once an Item is created.

Answer : The same Command may occur on more than one Item.

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


Options are :

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

Answer : MIDlet.startApp()

Given a MIDlet suite with its JAD file and a device that: downloads and installs the JAD file loses the network service during the download of the JAR file What is the correct behavior of a JTWI-compliant device?


Options are :

  • The device installs the portion of MIDlet suite it has downloaded until that point.
  • The server will push the MIDlet suite to the device the next time it has data network connectivity.
  • The device will try again to download the JAR file the next time it has data network connectivity.
  • The device aborts the installation and frees the space reserved for that MIDlet suite.

Answer : The device aborts the installation and frees the space reserved for that MIDlet suite.

Which two methods are available only within classes of the MIDP high-level UI API? (Choose two.)


Options are :

  • getTitle()
  • getKeyName()
  • isDoubleBuffered()
  • notifyStateChanged()

Answer : getTitle() notifyStateChanged()

Which two methods are available in both the low-level and high-level APIs? (Choose two.)


Options are :

  • getTitle()
  • getLayout()
  • isShown()
  • setFullScreenMode()

Answer : getTitle() isShown()

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


Options are :

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

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

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


Options are :

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

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

Which two methods are available only within classes of the MIDP low-level UI API? (Choose two.)


Options are :

  • hasRepeatEvents()
  • setFullScreenMode()
  • getLayout()
  • setPreferredSize()

Answer : hasRepeatEvents() setFullScreenMode()

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


Options are :

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

Answer : sms://+18005551234:1234

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


Options are :

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

Answer : WMA 1.1 MIDP 2.0

Given: a record store of type javax.microedition.rms.RecordStore, containing five records whose contents are Alice, Bill, Candice, Dean, and Ethel, respectively an enumeration for the record store that specifies a comparator that sorts alphabetically The first call to the enumeration is previousRecord(). Which would be returned by a second call to previousRecord()?


Options are :

  • Bill
  • Alice
  • Dean
  • Candice
  • Ethel

Answer : Dean

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

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

A mobile application developer is trying to reduce the memory footprint of a game using the MIDP Game API? Which is a valid approach?


Options are :

  • restrict the number of frames per Sprite to one
  • use a single bitmap background rather than multiple tiles
  • reuse a single GameCanvas throughout the application
  • implement keyPressed() and keyReleased()

Answer : reuse a single GameCanvas throughout the application

A MIDlet makes its only attempt to register a push connection on a JTWI device using: PushRegistry.registerConnection( "datagram://:79", midlet, "10.0.0.???"); Which is true?


Options are :

  • The MIDlet accepts datagram push connections on port 79 only from IP addresses in the range 10.0.0.100 to 10.0.0.255 and on any other port from IP addresses other than those in the range 10.0.0.100 to 10.0.0.255.
  • The MIDlet accepts datagram push connections on port 79 only from IP addresses in the range 10.0.0.0 to 10.0.0.255.
  • The MIDlet accepts datagram push connections on port 79 only from IP addresses in the range 10.0.0.100 to 10.0.0.255.
  • The call to registerConnection() causes an exception, because the string 10.0.0.??? is an illegal argument.

Answer : The MIDlet accepts datagram push connections on port 79 only from IP addresses in the range 10.0.0.100 to 10.0.0.255.

Which is true about PushRegistry.registerAlarm()?


Options are :

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

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

Which declaration is illegal?


Options are :

  • openRecordStore("Customer_Projections", true, RecordStore.AUTHMODE_ANY, true);
  • openRecordStore("Customer_Name_and_Address", true);
  • openRecordStore("High_Scores_Stored_by_City_and_Name", false);
  • openRecordStore("Salesperson_Projections_by_Month", "acme", "sales");

Answer : openRecordStore("High_Scores_Stored_by_City_and_Name", false);

Which two guarantee a wireless message will be removed from the incoming message buffer by the Application Management Software? (Choose two.)


Options are :

  • The incoming message buffer is full.
  • The message does NOT pass the filter defined in the connection URL.
  • The application has processed the incoming message.
  • The user denies permission to execute the application.

Answer : The message does NOT pass the filter defined in the connection URL. The application has processed the incoming message.

What is the result when a user tries to update a signed, installed MIDlet suite with an unsigned MIDlet suite with the same MIDlet-Name?


Options are :

  • The unsigned MIDlet suite is installed if it has a newer MIDlet-Version
  • The device blocks all access to any MIDlets
  • The signed MIDlet suite is left installed, even if the unsigned MIDlet suite has a newer MIDlet-Version.
  • The MIDlet suite with the newer MIDlet-Version is installed.

Answer : The signed MIDlet suite is left installed, even if the unsigned MIDlet suite has a newer MIDlet-Version.

Which three are top level interfaces in the javax.wireless.messaging package? (Choose three.)


Options are :

  • MessageConnection
  • Message
  • MessageListener
  • MessageHandler
  • Connector
  • Datagram

Answer : MessageConnection Message MessageListener

Which three classes are subclasses of Item? (Choose three.)


Options are :

  • TextField
  • ChoiceGroup
  • Form
  • Gauge
  • List

Answer : TextField ChoiceGroup Gauge

A Player plays a sound after start() is called. Which is the most efficient way to pause the playback so that it may be started as soon as possible when required?


Options are :

  • call close() on the player
  • call setRate(0) on the player
  • call stop() on the player
  • call System.gc() to collect those resources marked for garbage collection

Answer : call stop() on the player

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


Options are :

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

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

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


Options are :

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

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

Given: 11. HttpsConnection c = (HttpsConnection) Connector.open("https://www.mywebserver.com"); 12. int portNumber = c.getPort(); What is the value of the portNumber variable after executing the code?


Options are :

  • 80
  • 443
  • 0
  • 25

Answer : 443

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions