Dear Readers, Welcome to J2ME Objective Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your Job interview for the subject of J2ME MCQs. These objective type J2ME questions are very important for campus placement test and job interviews. As per my experience good interviewers hardly plan to ask any particular question during your Job interview and these model questions are asked in the online technical test and interview of many IT companies.
(a) IOException
(b) ServletException
(c) RemoteException
ANS: (b)
(a) This capability is not supported.
(b) When the servlet throws the exception, it will automatically be caught by the calling JSP page.
(c) 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".
(d) The servlet needs to redirect the response to the specific error page, saving the exception off in a cookie.
ANS: (c)
(a) forward executes on the client while sendRedirect() executes on the server.
(b) forward executes on the server while sendRedirect() executes on the client.
(c) The two methods perform identically.
ANS: (b)
(a) Allows separation of roles between web developers and application developers
(b) Allows integration with Content Management tools
ANS: (a)
(a) used to incorporate Java applets into a Web page.
(b) Downloads a plugin to the client Web browser to execute an applet or Bean.
(c) Both (a) & (b)
ANS: (c)
(a) Granularity
(b) Latency
(c) Lag time
ANS: (c)
(a) before ejbCreate() method is executed
(b) after ejbCreate() method is executed
(c) in postCreate() method
(d) after executing ejbStore()
ANS: (c)
(a) by using request.getMethod()
(b) by using request.setMethod()
(c) impossible to know
ANS: (a)
(a) A loop can begin in one Scriptlet and end in another
(b) Statements in Scriptlets should follow Java Syntax
(c) Semicolon is needed at the end of each statement in a Scriptlet
(d) All the above
ANS: (d)
(a) Start()
(b) Run()
(c) Servive()
(d) init()
ANS: (d)
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
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
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
A. Connected Device Configuration (CDC).
B. Connected Limited Device Configuration (CLDC).
Ans: B
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
A. CLDC and MIDP
B. CDC and Foundation
C. Both A and B
Ans: B
A. Foundation profile
B. Personal profile
C. Mobile Information Device Profile (MIDP)
D. None of the above
Ans: C
A. UDP datagrams
B. WAP
C. HTTP
D. All of the above
Ans: C
A. Can support only a single profile
B. Can support multiple profiles
Ans: B
A. True
B. False
Ans: A
A. Foundation profile
B. Personal profile
C. Mobile Information Device Profile (MIDP)
D. None of the above
Ans: B
A. 160 KB
B. 256 KB
C. 512 KB
D. 2 MB or More
Ans: D
A. KVM
B. CVM
C. PVM
Ans: B
A. 8 characters
B. 32 characters
C. 128 characters
D. No limit on the length of a record store name
Ans: B
A. No, it is not.
B. Yes, by inspecting the associated JAD file.
Ans: B
A. True
B. False
Ans: A
A. UDP datagrams
B. TCP sockets
C. HTTP connections
D. None of the above
Ans: A
A. UDP datagrams
B. TCP sockets
C. HTTP
D. All of the above
Ans: D
A. -classpath
B. -bootclasspath
C. -preverify
D. Any of the above
Ans: B
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
A. javax.microedition.MIDlet
B. javax.microedition.midlet
C. javax.microedition.midlet.MIDlet
D. javax.microedition.midlet.midlet
Ans: C
A. initApp, startApp
B. startApp, destroyApp
C. startApp, pauseApp, destroyApp
D. initApp, startApp, pauseApp, destroyApp
Ans: C
A. midp
B. javac-bootclasspath
C. preverify
D. jar
Ans: C
A. The ones in the descriptor override those in the manifest
B. The ones in the manifest override those in the descriptor
Ans: A
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
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
A. Can interact directly.
B. Cannot interact directly.
Ans: B
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
A. GIF
B. JPG
C. BMP
D. PNG
Ans: D
A. ActionListener
B. CommandListener
C. Windows Listener
D. ChoiceListener
Ans: B
A. javax.microedition.gui
B. javax.microedition.lcd
C. javax.microedition.lcdui
D. javax.microedition.display
Ans: C
A. True
B. False
Ans: B
A. Display
B. Command
C. Screen
D. Canvas
Ans: D
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
A. javax.microedition.Connection
B. javax.microedition.Connector
C. javax.microedition.StreamConnection
D. javax.microedition.HttpConnection
Ans: B
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
A. Object Serialization
B. JDBC
C. RMS
D. ODBC
Ans: C
A. Floating point numbers
B. Reflection
C. JNI
D. All of the above
Ans: D
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
A. Cookies
B. URL Rewriting
C. Hidden Fields
D. None of the above
Ans: B