J2ME


J2ME Multiple Choice Question Material
[1] What is a configuration?
(A) => A configuration defines a set of class libraries available for a particular domain of devices.
(B) => A configuration defines a vertical (or specialized) set of classes.
(C) => A configuration defines a minimum set of class libraries for a wide range of devices.
Answer =>> A configuration defines a minimum set of class libraries for a wide range of devices.

[2] What is a profile?
(A) => A profile defines a set of class libraries available for a wide range of devices.
(B) => A profile defines a horizontal set of classes that a configuration can use.
(C) => A profile defines the set of APIs available for a particular family of devices.
Answer =>> A profile defines the set of APIs available for a particular family of devices.

[3] The Personal Digital Assistant (PDA) Profile is based on:
(A) => Connected Device Configuration (CDC).
(B) => Connected Limited Device Configuration (CLDC).
(C) => None
Answer =>> Connected Limited Device Configuration (CLDC).

[4] The Foundation profile:
(A) => Extends the CDC by adding the missing user interface APIs.
(B) => Extends the CLDC by adding the missing Java 2, Standard Edition (J2SE) core libraries.
(C) => Is meant to serve as a foundation for other profiles.
Answer =>> Is meant to serve as a foundation for other profiles.

[5] The RMI profile is meant to be used with:
(A) => CLDC and MIDP
(B) => CDC and Foundation
(C) => Both A and B
Answer =>> CDC and Foundation

[6] The CLDC does not address user interface issues. They are left to be handled by the:
(A) => Foundation profile
(B) => Personal profile
(C) => Mobile Information Device Profile (MIDP)
Answer =>> Mobile Information Device Profile (MIDP)

[7] Which of the following network connections is supported by MIDP?
(A) => UDP datagrams
(B) => WAP
(C) => HTTP
Answer =>> HTTP

[8] A Java ME-enabled device:
(A) => Can support only a single profile
(B) => Can support multiple profiles
(C) => None
Answer =>> Can support multiple profiles

[9] A device that currently uses CLDC (and therefore has a profile) can use that profile with CDC without modification.
(A) => True
(B) => False
(C) => None
Answer =>> True

[10] In the CDC, user interface issues are handled by the:
(A) => Foundation profile
(B) => Personal profile
(C) => Mobile Information Device Profile (MIDP)
Answer =>> Personal profile

[11] The CDC targets devices with _______ of total memory available for the Java platform, including both RAM and flash or ROM.
(A) => 160 KB
(B) => 256 KB
(C) => 2 MB or More
Answer =>> 2 MB or More

[12] The Java Virtual Machine1 specified to be used with the CDC is:
(A) => KVM
(B) => CVM
(C) => PVM
Answer =>> CVM

[13] In MIDP, the maximum length of a record store name is:
(A) => 8 characters
(B) => 32 characters
(C) => 128 characters
Answer =>> 32 characters

[14] Is it possible to determine the contents of a JAR file before is it downloaded to a device?
(A) => No, it is not.
(B) => Yes, by inspecting the associated JAD file.
(C) => None
Answer =>> Yes, by inspecting the associated JAD file.

[15] The CDC and Foundation make corrections to the J2SE libraries by removing all noncritical, deprecated APIs.
(A) => True
(B) => False
(C) => None
Answer =>> True

[16] Which of the following network connections is supported by the CDC?
(A) => UDP datagrams
(B) => TCP sockets
(C) => HTTP connections
Answer =>> UDP datagrams

[17] Which of the following network connections is supported by the Foundation profile?
(A) => UDP datagrams
(B) => TCP sockets
(C) => All of the above
Answer =>> All of the above

[18] What compilation option should be used when compiling Java ME applications?
(A) => -classpath
(B) => -bootclasspath
(C) => -preverify
Answer =>> -bootclasspath

[19] Which of the following areas are being investigated by the MIDP Next Generation?
(A) => HTTPS and secure networking
(B) => Network connectivity through sockets and datagrams
(C) => None of the above
Answer =>> None of the above

[20] A midlet is a Java class that extends the abstract class:
(A) => javax.microedition.MIDlet
(B) => javax.microedition.midlet
(C) => javax.microedition.midlet.MIDlet
Answer =>> javax.microedition.midlet.MIDlet

[21] Which one of the following methods of the MIDlet abstract class must be implemented by a midlet:
(A) => initApp, startApp
(B) => startApp, destroyApp
(C) => startApp, pauseApp, destroyApp
Answer =>> startApp, pauseApp, destroyApp

[22] After compiling your midlet, you must process it with a command to ensure that it is valid before use by the Kilo virtual machine (KVM). What is the name of that command?
(A) => midp
(B) => javac-bootclasspath
(C) => preverify
Answer =>> preverify

[23] A Java Application Descriptor (JAD) file is a text file that is similar to a manifest, except that it is not packaged in a JAR file. Some of the shared attributes that must have identical values are: MIDlet-Name, MIDlet-Version, and MIDlet-Vendor. If any shared attributes are different, then:
(A) => The ones in the descriptor override those in the manifest
(B) => The ones in the manifest override those in the descriptor
(C) => None
Answer =>> The ones in the descriptor override those in the manifest

[24] When downloading application descriptors (.jad files) from a web server, the web server must return a MIME type of:
(A) => text/vnd.sun.j2me.midp
(B) => text/vnd.sun.j2me.jad
(C) => text/vnd.sun.j2me.app-descriptor
Answer =>> text/vnd.sun.j2me.app-descriptor

[25] A midlet suite is a set of midlets that are packed together into a single JAR file. Midlets within the same suite:
(A) => Can share the classes and resources contained in the JAR file
(B) => Cannot share the classes and resources contained in the JAR file
(C) => None
Answer =>> Can share the classes and resources contained in the JAR file

[26] Midlets from different suites:
(A) => Can interact directly.
(B) => Cannot interact directly.
(C) => None
Answer =>> Cannot interact directly.

[27] What is the difference between a configuration (such as the CLDC) and a profile (such as the MIDP)?
(A) => a configuration defines the set of class libraries available for a particular domain of devices, and a profile provides I/O and network APIs.
(B) => a configuration defines a vertical set of classes that a profile can use.
(C) => a configuration defines a minimum set of class libraries for a wide range of devices, and a profile defines the set of APIs available for a particular family of devices.
Answer =>> a configuration defines a minimum set of class libraries for a wide range of devices, and a profile defines the set of APIs available for a particular family of devices.

[28] All MIDP implementations are required to support what image format?
(A) => GIF
(B) => JPG
(C) => PNG
Answer =>> PNG

[29] If a midlet needs to receive high-level events from the implementation, which interface should it implement?
(A) => ActionListener
(B) => CommandListener
(C) => Windows Listener
Answer =>> CommandListener

[30] All MIDP GUI classes are contained in what package?
(A) => javax.microedition.gui
(B) => javax.microedition.lcd
(C) => javax.microedition.lcdui
Answer =>> javax.microedition.lcdui

[31] The MIDP user interface API is a subset of the AWT/ Project Swing libraries.
(A) => True
(B) => False
(C) => None
Answer =>> False

[32] Which class would you use to write applications to access low-level input events or to issue graphics calls for drawing to the display?
(A) => Display
(B) => Command
(C) => Canvas
Answer =>> Canvas

[33] Which of the following statements is true regarding the Generic Connection framework:
(A) => The CLDC provides an implementation for the HTTP protocol.
(B) => All MIDP implementations must provide support for the HTTP protocol.
(C) => The MIDP provides implementation for datagram and socket connections.
Answer =>> All MIDP implementations must provide support for the HTTP protocol.

[34] The heart of the Generic Connection framework is:
(A) => javax.microedition.Connection
(B) => javax.microedition.Connector
(C) => javax.microedition.StreamConnection
Answer =>> javax.microedition.Connector

[35] What is the correct syntax, using the Generic Connection framework, to open an HTTP connection:
(A) => Connection c = Connection.open("http://developer.java.sun.com");
(B) => Connection c = Connector.open("http://developer.java.sun.com");
(C) => Connector c = Connector.open("http://developer.java.sun.com");
Answer =>> Connection c = Connector.open("http://developer.java.sun.com");

[36] The MIDP provides a mechanism for MIDlets to persistently store data in a platform-dependent file and retrieve it later. This mechanism is:
(A) => Object Serialization
(B) => JDBC
(C) => RMS
Answer =>> RMS

[37] A Java virtual machine1 (JVM) supporting CLDC has no support for:
(A) => Floating point numbers
(B) => Reflection
(C) => All of the above
Answer =>> All of the above

[38] Which of the following non-exception classes are inherited from the Java 2 Standard Edition 1.3 java.util package by the CLDC:
(A) => Calendar, Date, Enumeration, Hashtable, Stack, Vector
(B) => Calendar, Date, Enumeration, Hashtable, Random, Stack, Timer, Vector
(C) => Calendar, Date, Enumeration, Hashtable, Stack, Vector, StringTokenzier
Answer =>> Calendar, Date, Enumeration, Hashtable, Stack, Vector, StringTokenzier

[39] Which of the following techniques can be used for wireless session tracking?
(A) => Cookies
(B) => URL Rewriting
(C) => Hidden Fields
Answer =>> URL Rewriting

[40] Which class would you use to write applications to access low-level input events or to issue graphics calls for drawing to the display?
(A) => Display
(B) => Command
(C) => Screen
Answer =>> Screen

[41] Which one of the following methods of the MIDlet abstract class must be implemented by a midlet:
(A) => initApp, startApp
(B) => startApp, destroyApp
(C) => startApp, pauseApp, destroyApp
Answer =>> startApp, pauseApp, destroyApp

[42] All MIDP GUI classes are contained in what package?
(A) => javax.microedition.gui
(B) => javax.microedition.lcd
(C) => javax.microedition.lcdui
Answer =>> javax.microedition.lcdui

[43] Which of the following techniques can be used for wireless session tracking?
(A) => Cookies
(B) => URL Rewriting
(C) => Hidden Fields
Answer =>> URL Rewriting

[44] A midlet is a Java class that extends the abstract class:
(A) => javax.microedition.MIDlet
(B) => javax.microedition.midlet
(C) => javax.microedition.midlet.MIDlet
Answer =>> javax.microedition.midlet.MIDlet

[45] All MIDP implementations are required to support what image format?
(A) => GIF
(B) => BMP
(C) => PNG
Answer =>> PNG

[46] The heart of the Generic Connection framework is:
(A) => javax.microedition.Connection
(B) => javax.microedition.Connector
(C) => javax.microedition.StreamConnection
Answer =>> javax.microedition.StreamConnection

[47] If a midlet needs to receive high-level events from the implementation, which interface should it implement?
(A) => ActionListener
(B) => CommandListener
(C) => Windows Listener
Answer =>> CommandListener

[48] A Java virtual machine1 (JVM) supporting CLDC has no support for:
(A) => Floating point numbers
(B) => Reflection
(C) => All of the above
Answer =>> All of the above

[49] The MIDP user interface API is a subset of the AWT/ Project Swing libraries.
(A) => True
(B) => False
(C) => None
Answer =>> False

[50] A midlet is a Java class that extends the abstract class:
(A) => javax.microedition.MIDlet
(B) => javax.microedition.midlet
(C) => javax.microedition.midlet.MIDlet
Answer =>> javax.microedition.midlet.MIDlet

[51] Which one of the following methods of the MIDlet abstract class must be implemented by a midlet:
(A) => initApp, startApp
(B) => startApp, destroyApp
(C) => startApp, pauseApp, destroyApp
Answer =>> startApp, pauseApp, destroyApp