Skip to main content

70 Top J2ME Multiple Choice Questions and Answers

List of top 70 J2ME multiple choice questions and answers for freshers beginners and experienced PDF.


J2ME Multiple Choice Questions and Answers


1. Which of the following statements is true about Java ME?

  A.    Java ME is a single specification.

  B.    Java ME is a family of related specifications.

  C.    Java ME is a platform for creating applications for the well-established desktop market.

  D.    Java ME is a platform for creating server-side enterprise applications.

Ans: B


2. 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.

  D.    All of the above.

Ans: C


3. 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.

  D.    A profile is the foundation for a configuration.

Ans: C


4. The Personal Digital Assistant (PDA) Profile is based on:

  A.    Connected Device Configuration (CDC).

  B.    Connected Limited Device Configuration (CLDC).

Ans: B


5. 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.

  D.    All of the above.

Ans: C


6. The RMI profile is meant to be used with:

  A.    CLDC and MIDP

  B.    CDC and Foundation

  C.    Both A and B

Ans: B


7. 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)

  D.    None of the above

Ans: C


8. Which of the following network connections is supported by MIDP?

  A.    UDP datagrams

  B.    WAP

  C.    HTTP

  D.    All of the above

Ans: C


9. A Java ME-enabled device:

  A.    Can support only a single profile

  B.    Can support multiple profiles

Ans: B


10. A device that currently uses CLDC (and therefore has a profile) can use that profile with CDC without modification.

  A.    True

  B.    False

Ans: A


11. In the CDC, user interface issues are handled by the:

  A.    Foundation profile

  B.    Personal profile

  C.    Mobile Information Device Profile (MIDP)

  D.    None of the above

Ans: B


12. 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.    512 KB

  D.    2 MB or More   

Ans: D


13. The Java Virtual Machine1 specified to be used with the CDC is:

  A.    KVM

  B.    CVM

  C.    PVM

Ans: B


14. In MIDP, the maximum length of a record store name is:

  A.    8 characters

  B.    32 characters

  C.    128 characters

  D.    No limit on the length of a record store name

Ans: B


15. 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.

Ans: B


16. The CDC and Foundation make corrections to the J2SE libraries by removing all noncritical, deprecated APIs.

  A.    True

  B.    False

Ans: A


17. Which of the following network connections is supported by the CDC?

  A.    UDP datagrams   

  B.    TCP sockets

  C.    HTTP connections

  D.    None of the above

Ans: A


18. Which of the following network connections is supported by the Foundation profile?

  A.    UDP datagrams

  B.    TCP sockets

  C.    HTTP

  D.    All of the above

Ans: D


19. What compilation option should be used when compiling Java ME applications?

  A.    -classpath

  B.    -bootclasspath

  C.    -preverify

  D.    Any of the above

Ans: B


20. 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.    Extensions to the low-level user interface APIs to allow greater game functionality

  D.    All of the above

  E.    None of the above

Ans: E


21. A midlet is a Java class that extends the abstract class:

  A.    javax.microedition.MIDlet

  B.    javax.microedition.midlet

  C.    javax.microedition.midlet.MIDlet

  D.    javax.microedition.midlet.midlet

Ans: C


22. 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

  D.    initApp, startApp, pauseApp, destroyApp

Ans: C


23. 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

  D.    jar

Ans: C


24. 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

Ans: A


25. 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

  D.    text/vnd.sun.j2me.midapp

Ans: C


26. 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

Ans: A


27. Midlets from different suites:

  A.     Can interact directly.

  B.    Cannot interact directly.

Ans: B


28. 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.

  D.    a profile is the foundation for a configuration.

Ans: C


29. All MIDP implementations are required to support what image format?

  A.    GIF

  B.    JPG

  C.    BMP

  D.    PNG

Ans: D


30. If a midlet needs to receive high-level events from the implementation, which interface should it implement?

  A.    ActionListener

  B.    CommandListener

  C.    Windows Listener

  D.    ChoiceListener

Ans: B


31. All MIDP GUI classes are contained in what package?

  A.    javax.microedition.gui

  B.    javax.microedition.lcd

  C.    javax.microedition.lcdui

  D.    javax.microedition.display

Ans: C


32. The MIDP user interface API is a subset of the AWT/ Project Swing libraries.

  A.     True

  B.    False

Ans: B


33. 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

  D.    Canvas

Ans: D


34. 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.

  D.    The Connection interface is part of the java.net package.

Ans: B


35. The heart of the Generic Connection framework is:

  A.     javax.microedition.Connection

  B.    javax.microedition.Connector

  C.    javax.microedition.StreamConnection

  D.    javax.microedition.HttpConnection

Ans: B


36. 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.    Connector c = Connector.open("http://developer.java.sun.com");

  C.    Connection c = Connector.open("http://developer.java.sun.com");

  B.    Connector c = Connection.open("http://developer.java.sun.com");

Ans: C


37. 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

  D.    ODBC

Ans: C


38. A Java virtual machine1 (JVM) supporting CLDC has no support for:

  A.    Floating point numbers

  B.    Reflection

  C.    JNI

  D.    All of the above

Ans: D


39. 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

  D.    All of the java.util classes are inherited

Ans: B


40. Which of the following techniques can be used for wireless session tracking?

  A.    Cookies

  B.    URL Rewriting

  C.    Hidden Fields

  D.    None of the above

Ans: B


41. 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

D. None of these

Ans: C


42. Which one of the following methods of the MIDlet abstract class must be implemented by a midlet:

A.initApp, startApp

B.startApp, destroyApp

C.initApp, startApp, pauseApp, destroyApp

D. startApp, pauseApp, destroyApp

Ans: D WWW.PECET.ACSCHE.AC.IN


43. All MIDP GUI classes are contained in what package?

A. javax.microedition.gui

B. javax.microedition.lcd

C. javax.microedition.lcdui

D. javax.microedition.display

Ans: C


44. Which of the following techniques can be used for wireless session tracking?

A. Cookies

B. URL Rewriting

C. Hidden Fields

D. None of the above

Ans: B


45. A midlet is a Java class that extends the abstract class:

A. javax.microedition.MIDlet

B. javax.microedition.midlet

C. javax.microedition.midlet.MIDlet

D. javax.microedition.midlet.midlet

Ans: C


46. All MIDP implementations are required to support what image format?

A. GIF

B. JPG

C. BMP

D. PNG

Ans: D


47.The heart of the Generic Connection framework is:

A. javax.microedition.Connection

B. javax.microedition.Connector

C. javax.microedition.StreamConnection

D. javax.microedition.HttpConnection

Ans: C


48. If a midlet needs to receive high-level events from the implementation, which interface should it implement?

A. ActionListener

B. CommandListener

C. Windows Listener

D. ChoiceListener

Ans: B


49. A Java virtual machine1 (JVM) supporting CLDC has no support for:

A. Floating point numbers

B. Reflection

C. JNI

D. All of the above

Ans: D


50. The MIDP user interface API is a subset of the AWT/ Project Swing libraries.

A. True

B. False

Ans: B


51. A midlet is a Java class that extends the abstract class:

A.    javax.microedition.MIDlet

B.    javax.microedition.midlet

C.    javax.microedition.midlet.MIDlet

D.    javax.microedition.midlet.midlet

Ans: C


52. 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

D.    initApp, startApp, pauseApp, destroyApp

Ans: C


53. 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

D.    jar

Ans: C


54. 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.

A.    The ones in the descriptor override those in the manifest

B.    The ones in the manifest override those in the descriptor

 Ans: A


55. 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

D.    text/vnd.sun.j2me.midapp

Ans: C


56. 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

Ans: A


57. Midlets from different suites:

A.    Can interact directly.

B.    Cannot interact directly.

Ans: B


58. 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.

D.    a profile is the foundation for a configuration.

Ans: C


59. All MIDP implementations are required to support what image format?

A.    GIF

B.    JPG

C.    BMP

D.    PNG

Ans: D


60. If a midlet needs to receive high-level events from the implementation, which interface should it implement?

A.    ActionListener

B.    CommandListener

C.    Windows Listener

D.    ChoiceListener

Ans: B


61. All MIDP GUI classes are contained in what package?

A.    javax.microedition.gui

B.    javax.microedition.lcd

C.    javax.microedition.lcdui

D.    javax.microedition.display

Ans: C


62. The MIDP user interface API is a subset of the AWT/ Project Swing libraries.

A.    True

B.    False

Ans: B


63. 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

D.    Screen

Ans: D


64. 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.

D.    The Connection interface is part of the java.net package.

Ans: B


65. The heart of the Generic Connection framework is:

A.    javax.microedition.Connection

B.    javax.microedition.Connector

C.    javax.microedition.StreamConnection

D.    javax.microedition.HttpConnection

Ans: B


66. 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.    Connector c = Connector.open("http://developer.java.sun.com");

C.    Connection c = Connector.open("http://developer.java.sun.com");

D.    Connector c = Connection.open("http://developer.java.sun.com");

Ans: C


67. The MIDP provides a mechanism for MIDlets to persistently store data in a platform-dependent file and retrieve it later. This mechanism is:

A.    JDBC

B.    RMS

C.    ODBC

Ans: C


68. A Java virtual machine1 (JVM) supporting CLDC has no support for:

A.    Floating point numbers

B.    Reflection

C.    JNI

D.    All of the above

Ans: D


69. 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

D.    All of the java.util classes are inherited

Ans: B


70. Which of the following techniques can be used for wireless session tracking?

A.    Cookies

B.    URL Rewriting

C.    Hidden Fields

D.    None of the above

Ans: B

Comments

Popular posts from this blog

Conjunction Worksheet

Practice English Grammar Conjunctions with the below Conjunction worksheet. Apart from this Conjunction worksheet, you can also go through other Conjunction exercises: Conjunction exercise 1 , Conjunction exercise 2 . Co-ordinating Conjunctions A conjunction placed between words, phrases, clauses, or sentences of equal rank, e.g. and, but, or. [ Via ] Correlative Conjunctions They get their name from the fact that they work together (co-) and relate one sentence element to another. Correlative conjunctions include pairs like "both/and," "whether/or," "either/or," "neither/nor," "not/but" and "not only/but also". [ Via ] For example He'd rather run to school than walking. Identify Co-ordinating Conjunctions: 1. Many women and children came to see the movie. 2. I wrote to him, but she did not respond. 3. Her condition became worse, so she was taken to nearby hospital. 4. We should hire a cab, otherwise we will n...

50 Top DHCP Multiple Choice Questions and Answers

Below are the list of top 50 DHCP multiple choice questions and answers for freshers beginners and experienced DHCP Multiple Choice Questions and Answers 1. What is the purpose of the DHCP server? A � to provide storage for email B � to translate URLs to IP addresses C � to translate IPv4 addresses to MAC addresses D � to provide an IP configuration information to hosts Answer: D 2. How is the message sent from a PC2 when is first powers on and attempts to contact the DHCP Server? A � Layer 3 unicast B � Layer 3 broadcast C � Layer 3 multicast D � Without any Layer 3 encapsulation Answer: B 3. What is the default behavior of R1 when PC1 requests service from DHCP server? A � Drop the request B � Broadcast the request to R2 and R3 C � Forward the request to R2 D � Broadcast the request to R2, R3 and ISP Answer: A 4. Refer to the exhibit. Which rule does the DHCP server use when there is an IP address conflict? A. The address is removed from the pool until the conflict is resolved. B. Th...

PHP Constructors Multiple Choice Questions

PHP Constructors Multiple Choice Questions 1) PHP recognises constructors by the name . . . . . A) _construct B) __construct C) __constructor D) _constructor 2) In . . . . . constructors, it is important to remember that you have to call the parent constructor explicitly. A) Singleton B) secure C) public D) subclass 3) Constructor and destructor methods have no . . . . . . and are called automatically - they cannot be called explicitly and consequently their declarations need no access specifier. A) parameters B) destructor C) return value D) aproval 4) Unlike constructors, you cannot pass information to a destructor, because you are never sure when its going to be run. A) True B) False 5) You can invoke class constructors that don’t have any relation to the instantiated object by simply prefacing _constructor with the class name like A) classname::__construct() B) classname:__construct() C) classname=>__construct() D) classname->__construct() 6) . . . . . . is...