J2ME - Java Platform Micro Edition MCQs

J2ME - Java Platform Micro Edition MCQs

Our experts have gathered these J2ME - Java Platform Micro Edition MCQs through research, and we hope that you will be able to see how much knowledge base you have for the subject of J2ME - Java Platform Micro Edition by answering these 70+ multiple-choice questions.
Get started now by scrolling down!

1: Which of the following is not addressed by MIDP?

A.   Display toolkit and user input methods

B.   Messaging

C.   Security and networking over wireless network connections

D.   Persistent data storage

E.   All of the above are addressed

2:

What will happen on attempting to compile and run the following code?

public class ERMidlet extends MIDlet implements CommandListener, Runnable

{

        private Display mDisplay;

        private Form myForm;

        private Command exitCommand;

        private StringItem myString;

        ERMidlet()

        {

                myForm = new Form("Expert Rating Exam");

                exitCommand = new Command("Exit",Command.EXIT, 0);

                myString = new StringItem("15");

                myForm.append(myString);

                myForm.addCommand(exitCommand);

                myForm.setCommandListener(this);

        }

        public void startApp()

        {

                mDisplay = Display.getDisplay(this);

                mDisplay.setCurrent(myForm);

        }

        public void commandAction (Command c, Displayable s)

        {

                destroyApp(false);

                notifyDestroyed();

        }

        public void run()

        {

        }

        public void pauseApp()

        {

        }

        public void destroyApp(boolean unconditional)

        {

        }

}

A.  

It will display 15 on the devices screen 

B.  

The code will not compile


C.  

The code will compile but will throw a runtime exception


D.  

It will not display anything


3: Which of the following is not a characteristic features of the target devices of CDLC?

A.   They have 128KB to 512KB of total memory

B.   They support the complete JVM specification

C.   They are often battery powered

D.   They are network enabled

4: The constant to create a modal alert is:

A.   Alert.FOREVER

B.   AlertType.FOREVER

C.   Alert.MODAL

D.   AlertType.ALWAY

5: The version of CLDC in a JAD file can be known by the:

A.   MIDlet-Configuration

B.   Microedition-Configuration

C.   MIDP-Configuration

D.   Configuration

6: The RecordStore can be shared among multiple MIDlets.

A.   True

B.   False

7: Which of the following are not supported by the CLDC 1.1 VM?

A.   Weak references

B.   Float calculations

C.   Threads

D.   Finalization

8: Which of the following are Java ME profiles?

A.   MIDP

B.   Foundation

C.   Personal

D.   Vista

9: Which of the following profile is supported by CLDC?

A.   MIDP

B.   Foundation

C.   Personal

10: Which of the following is not the characteristic feature of the target devices of CDC?

A.   They have a minimum of 512KB ROM

B.   They support the complete JVM specification

C.   They are network enabled

D.   They have a minimum of 512KB RAM

11: Which of the following is designed for single-processor desktop environments that require faster start-up time and a smaller memory footprint?

A.   CLDC HotSpot Implementation

B.   Java HotSpot Client

C.   Java HotSpot Server

12: Which of the following is designed for very small memory scenarios, typically 128 KB to 512 KB for the Java application environment?

A.   CDC HotSpot Implementation

B.   CLDC HotSpot Implementation

C.   Java HotSpot Client

13: The minimum number of threads supported by JTWI complaint implementations are:

A.   5

B.   10

C.   16

D.   32

A.  

Statement X is incorrect and Statement Y is correct 

B.  

Statement X is correct and Statement Y is incorrect


C.  

Both Statements X,Y are correct


D.  

Both Statements X,Y are incorrect


15:

Which of the following is designed for resource-constrained devices like consumer products and embedded devices?

A.  

CDC HotSpot Implementation

B.  

CLDC HotSpot Implementation

C.  

Java HotSpot Client


D.  

Java HotSpot Server


16: Which of the following is true for Technology Compatibility Kit(TCK)?

A.   TCK is applicable in CLDC only

B.   TCKs are developed and licensed by the JSR specification lead

C.   TCK is a test suite that verifies whether an implementation is compliant with a given JSR

17: The MIDlet permission is defined in a JAD file using __________.

A.   Microedition-Permissions

B.   MIDP-Permissions

C.   Midlet-Permissions

D.   MIDlet-Configuration

18: The default mode for an open connection is:

A.   READ

B.   WRITE

C.   READ_WRITE

D.   Any of the above

19: What would be the values for boxes 1 and 2 respectively in the given Generic Framework figure?

A.   Content connection and stream connection

B.   Stream connection and content connection

C.   Data Notifier and stream connection

20: Which of the following is in sync with the sandbox model?

A.   Java class files have been properly verified and guaranteed to be valid Java applications

B.   Access to native functions is allowed

C.   Only a limited, predefined set of Java APIs are available to the application programmer

D.   The programmer can override the standard class loading mechanism or the system classes of the VM

E.   The programmer can download new libraries containing the native code

21: Which of the following is not required for JTWI?

A.   WMA 1.1

B.   CLDC 1.1

C.   MIDP 2.0

D.   MMAPI 1.1

22:

State whether true or false:

A MIDlet can retrieve its environment properties.

A.  

True 

B.  

False

23: Which of the following are not Java ME Configurations?

A.   Connected Device Configuration

B.   Connected Restricted Configuration

C.   Connected Limited Device Configuration

D.   Common Legitimate Device Configuration

24: Which of the following methods would be suitable in opening a connection using the Generic Connection framework?

A.   connect(url)

B.   Connector.open(url)

C.   Network.open(url)

D.   conopen(url)

25: SMS Push is not required for JTWI.

A.   True

B.   False

26: Which of the following statements regarding configuration in Java ME is incorrect?

A.   It is defined by the Java Community Process

B.   It is not subjected to compatibility tests

C.   It specifies the minimum Java libraries required for a particular set of devices

D.   It specifies the minimum virtual machine capabilities required for a particular set of devices

27: For a device to be JTWI MMAPI enabled, it must support:

A.   16 Bit KHz color PCM (video)

B.   16 Bit KHz mono PCM (audio)

C.   8 Bit KHz mono PCM (audio)

D.   8 Bit KHz color PCM (video)

28: Which of the following in CLDC is not derived from J2SE?

A.   Vector

B.   Stack

C.   Hashtable

D.   ArrayList

E.   Enumeration

29: The CLDC properties are defined in:

A.   microedition.platform

B.   microedition.profiles

C.   microedition.configuration

D.   microedition.reflection

30: Which of the following authmodes can be used to share a RecordStore between multiple MIDlets?

A.   AUTHMODE_ANY

B.   AUTHMODE_SHARED

C.   AUTHMODE_PUBLIC

D.   A RecordStore cannot be shared between multiple MIDlets

31: Which of the following statements are correct regarding CLDC security?

A.   The J2SE security model is too big to be implemented in J2ME

B.   It defines low-level virtual machine security

C.   It defines high-level virtual machine security

D.   It defines application-level security

32: Which of the following image formats is supported by JTWI 1.0?

A.   JPEG and GIF

B.   PNG

C.   TIFF and PNG

D.   PNG and JPEG

33: Which of the following packages constitute the Java ME?

A.   JCP

B.   Configuration

C.   Profiles

D.   Optional packages

34: Which of the following statements is correct regarding RecordStores?

A.   A call to RecordStore.deleteRecord will allow the recordID to be reused

B.   When updating a record, another user can update the same record at the same time

C.   All RecordStore operations are atomic, synchronized, and serialized

35: The character limit for an SMS Text message is:

A.   70 characters

B.   160 characters

C.   Whether it is 160 or 70 characters depends on the encoding

36:

What would you infer from the following code?

1.MessageConnection conn;

2.

3. public void startApp()

4. {

5.

6. try

7. {

8. conn = (MessageConnection)Connector.open("cbs://:3382");

9. }

10. catch(Exception e)

11. {

12. //Some exception handling

13. }

14. }

15.

16. public void run()

17. {

18. Message msg = conn.receive();

19. conn.send(msg);

20. }

A.  

There is an error on line 8 

B.  

There is an error on line 18

C.  

There is an error on line 19


37: According to JTWI, what is the standard size for a MIDlet jar file?

A.   32KB

B.   128KB

C.   64KB

D.   16KB

38: According to JTWI, what is the standard size for a JAD file?

A.   32KB

B.   128KB

C.   64KB

D.   5KB

39: Which of the following devices is served by CLDC?

A.   PDAs and Communicators

B.   Phones and Pagers

C.   Embedded Devices

40: Which of the following could be the reasons for the introduction of the Generic Connection framework?

A.   In J2SE Networking classes, the total size was greater than 200Mb

B.   J2SE Networking classes assume TCP/IP is available

C.   Both of the above

41: Mids server should only download data which has a MIME type of:

A.   text/vnd.sun.j2me.app-configuration

B.   text/vnd.sun.j2me.app-description

C.   text/vnd.sun.j2me.domain-configuration

D.   text/vnd.sun.j2me.domain-description

42: Identify the incorrect statement regarding CLDC:

A.   It enables dynamic downloading of applications and content to small devices

B.   It is a minimum-footprint application development platform for resource constrained connected devices

C.   It enables third-party software development for small devices

D.   It is not standardized through the Java Community Process

43: Which of the following profiles give full AWT and applet support?

A.   Personal

B.   Foundation

C.   RMI

D.   All of the above

44: Which of the following is used to specify the Push enable MIDlets?

A.   Midlet-Push-

B.   Midlet-enable-

C.   Midlet-Push-

D.   Midlet-enable-

45: Which of the following migration of codes is possible?

A.   CDC-->CLDC

B.   CLDC-->CDC

C.   MIDP-->CDC

46: Which of the following statements are correct regarding Xlet application programming model?

A.   Xlets must have GUI, whereas standalone application may have or may not have GUI

B.   It is very similar to the applet application programming model

C.   It is possible only to run single Xlet application

D.   The lifecycle of Xlet is init, start, stop and destroy, whereas for stand-alone application there is main and exit only

47: Which of the following functions fall under the scope of J2ME profiles?

A.   Application installation and life-cycle management

B.   Event Handling

C.   Database Support

D.   High-level Application Model

E.   User Interface Support

F.   All of the above

48: Which of the following is designed for multi-processor enterprise server environments that require maximum program execution speed, 64-bit support and very large memory heaps?

A.   CDC HotSpot Implementation

B.   CLDC HotSpot Implementation

C.   Java HotSpot Client

D.   Java HotSpot Server

49: In J2ME, the approximate number of classes taken from J2SE java.util is:

A.   16

B.   23

C.   8

D.   30

50: In J2ME, the approximate number of classes taken from J2SE java.io is:

A.   18

B.   13

C.   22

D.   30