J2ME/J2ME Mcq Question Set 1 Sample Test,Sample questions

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

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
 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: 

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

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

3.all of the above

4.None of the mentioned


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

1.ActionListener

2.CommandListener

3.Windows Listener

4.ChoiceListener


Question:
 In JSP, how can you know what HTTP method (GET or POST) is used by client request ?

1. by using request.getMethod()

2.by using request.setMethod()

3. impossible to know

4.None of the mentioned


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

1.8 characters

2.32 characters

3.128 characters

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


Question:
 In the CDC, user interface issues are handled by the:

1.Foundation profile

2.Personal profile

3.Mobile Information Device Profile (MIDP)

4.none of the above


Question:
 The heart of the Generic Connection framework is: 

1. javax.microedition.Connection

2.javax.microedition.Connector

3. javax.microedition.StreamConnection

4.javax.microedition.HttpConnection


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

1. True

2.False

3.all of the above

4.None of the mentioned


Question:
 What is the correct syntax, using the Generic Connection framework, to open an HTTP connection: 

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

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

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

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


Question:
 What is the difference between a configuration (such as the CLDC) and a profile (such as the MIDP)?

1.a configuration defines the set of class libraries available for a particular domain of devices, and a profile provides I/O and network APIs.

2.a configuration defines a vertical set of classes that a profile can use.

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

4.A profile is the foundation for a configuration.


Question:
 Which of the following network connections is supported by MIDP?

1.UDP datagrams

2.WAP

3.HTTP

4.All of the above


Question:
 Which of the following network connections is supported by the Foundation profile?

1.UDP datagrams

2.TCP sockets

3.HTTP

4.All of the above


Question:
 Which of the following statements is true regarding the Generic Connection framework:

1.The CLDC provides an implementation for the HTTP protocol.

2.All MIDP implementations must provide support for the HTTP protocol.

3.The MIDP provides implementation for datagram and socket connections.

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


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

1.initApp, startApp

2.startApp, destroyApp

3.startApp, pauseApp, destroyApp

4.initApp, startApp, pauseApp, destroyApp


Question:
. Is it possible to determine the contents of a JAR file before is it downloaded to a device?

1.No, it is not.

2.Yes, by inspecting the associated JAD file.

3.all of the above

4.None of the mentioned


Question:
A Java ME-enabled device:

1.Can support only a single profile

2.Can support multiple profiles

3.all of the above

4.None of the mentioned


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

1.Floating point numbers

2.Reflection

3.JNI

4.All of the above


Question:
A midlet is a Java class that extends the abstract class: 

1.javax.microedition.MIDlet

2.javax.microedition.midlet

3. javax.microedition.midlet.MIDlet

4.javax.microedition.midlet.midlet


Question:
A midlet suite is a set of midlets that are packed together into a single JAR file. Midlets within the same suite: 

1.Can share the classes and resources contained in the JAR file

2.Cannot share the classes and resources contained in the JAR file

3.all of the above

4.None of the mentioned


Question:
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? 

1.midp

2.javac-bootclasspath

3.preverify

4. jar


Question:
All MIDP GUI classes are contained in what package? 

1.javax.microedition.gui

2.javax.microedition.lcd

3.javax.microedition.lcdui

4.javax.microedition.display


Question:
All MIDP implementations are required to support what image format? 

1.GIF

2.JPG

3.BMP

4.PNG


Question:
At what stage, the life cycle of a CMP bean can be assumed to be started ?

1.before ejbCreate() method is executed

2.after ejbCreate() method is executed

3.in postCreate() method

4.after executing ejbStore()


Question:
How can a Servlet call a JSP error page ?

1. This capability is not supported.

2.When the servlet throws the exception, it will automatically be caught by the calling JSP page.

3. The servlet needs to forward the request to the specific error page URL. The exception is passed along as an attribute named "javax.servlet.jsp.jspException".

4.The servlet needs to redirect the response to the specific error page, saving the exception off in a cookie.


Question:
Midlets from different suites:

1.Can interact directly.

2.Cannot interact directly.

3.all of the above

4.None of the mentioned


Question:
Purpose of tag

1.used to incorporate Java applets into a Web page.

2.Downloads a plugin to the client Web browser to execute an applet or Bean.

3.both (a) & (b)

4.None of the mentioned


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

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
The CDC targets devices with _______ of total memory available for the Java platform, including both RAM and flash or ROM.

1.160 KB

2.256 KB

3.512 KB

4.2 MB or More


Question:
The CLDC does not address user interface issues. They are left to be handled by the:

1. Foundation profile

2.Personal profile

3.Mobile Information Device Profile (MIDP)

4.none of the above


Question:
The Foundation profile:

1.Extends the CDC by adding the missing user interface APIs.

2. Extends the CLDC by adding the missing Java 2, Standard Edition (J2SE) core libraries.

3. Is meant to serve as a foundation for other profiles.

4.All of the above.


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

1.KVM

2.CVM

3.PVM

4.None of the mentioned


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

1.Object Serialization

2.JDBC

3.RMS

4.ODBC


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

1.Connected Device Configuration (CDC).

2.Connected Limited Device Configuration (CLDC).

3.all of the above

4.None of the mentioned


Question:
The RMI profile is meant to be used with:

1.CLDC and MIDP

2. CDC and Foundation

3. Both A and B

4.None of the mentioned


Question:
The time between Command Execution and Response is called ______

1.Granularity

2.Latency

3.Lag time

4.None of the mentioned


Question:
What compilation option should be used when compiling Java ME applications?

1.-classpath

2.-bootclasspath

3.-preverify

4.Any of the above


Question:
What exception is thrown when Servlet initialization fails ?

1.IOException

2.ServletException

3.RemoteException

4.None of the mentioned


Question:
What is a configuration?

1.A configuration defines a set of class libraries available for a particular domain of devices.

2.A configuration defines a vertical (or specialized) set of classes.

3.A configuration defines a minimum set of class libraries for a wide range of devices.

4.All of the above.


Question:
What is a profile?

1.A profile defines a set of class libraries available for a wide range of devices.

2.A profile defines a horizontal set of classes that a configuration can use.

3.A profile defines the set of APIs available for a particular family of devices.

4.A profile is the foundation for a configuration.


Question:
What is legal about JSP scriplets

1. A loop can begin in one Scriptlet and end in another

2.Statements in Scriptlets should follow Java Syntax

3. Semicolon is needed at the end of each statement in a Scriptlet

4. all the above


Question:
What is the key difference between using a and HttpServletResponse.sendRedirect()?

1. forward executes on the client while sendRedirect() executes on the server.

2.forward executes on the server while sendRedirect() executes on the client.

3.The two methods perform identically.

4.All of the Mentioned


Question:
When downloading application descriptors (.jad files) from a web server, the web server must return a MIME type of: 

1.text/vnd.sun.j2me.midp

2.text/vnd.sun.j2me.jad

3.text/vnd.sun.j2me.app-descriptor

4.text/vnd.sun.j2me.midapp


Question:
Which class would you use to write applications to access low-level input events or to issue graphics calls for drawing to the display? 

1. Display

2.Command

3.Screen

4.Canvas


Question:
Which method is called first each time a Servlet is invoked ?

1. Start()

2.Run()

3. Servive()

4. init()


Question:
Which of the following areas are being investigated by the MIDP Next Generation?

1.HTTPS and secure networking

2.Network connectivity through sockets and datagrams

3.Extensions to the low-level user interface APIs to allow greater game functionality

4.none of the above


Question:
Which of the following network connections is supported by the CDC?

1.UDP datagrams

2.TCP sockets

3.HTTP connections

4.none of the above


Question:
Which of the following non-exception classes are inherited from the Java 2 Standard Edition 1.3 java.util package by the CLDC: 

1.Calendar, Date, Enumeration, Hashtable, Stack, Vector

2.Calendar, Date, Enumeration, Hashtable, Random, Stack, Timer, Vector

3.Calendar, Date, Enumeration, Hashtable, Stack, Vector, StringTokenzier

4.All of the java.util classes are inherited


Question:
Which of the following statements is true about Java ME?

1.Java ME is a single specification.

2.Java ME is a family of related specifications.

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

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


Question:
Which of the following techniques can be used for wireless session tracking? 

1.Cookies

2.URL Rewriting

3.Hidden Fields

4.none of the above


Question:
Why beans are used in J2EE architecture in stead of writing all the code in JSPs ?

1. Allows separation of roles between web developers and application developers

2.Allows integration with Content Management tools

3.all of the above

4.None of the mentioned


More MCQS

  1. J2ME Mcq Question Set 1
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!