oDesk J2ME Test 2015
·
1. Which of the following are not
supported by the CLDC 1.1 VM?
Answers:
• Weak references
• Float calculations
• Threads
• Finalization
2. Which of the following is not addressed by
MIDP?
Answers:
• Display toolkit
and user input methods
• Messaging
• Security and
networking over wireless network connections
• Persistent data
storage
• All of the above are
addressed
3. Which of the following are Java ME
profiles?
Answers:
• MIDP
• Foundation
• Personal
• Vista
4. 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)
{
}
}
Answers:
• It will display 15 on the
devices screen
• The code will
not compile
• The code will
compile but will throw a runtime exception
• It will not
display anything
5. Which of the following is not a
characteristic features of the target devices of CDLC?
Answers:
• They have 128KB
to 512KB of total memory
• They support the complete
JVM specification
• They are often
battery powered
• They are
network enabled
6. Which of the following profile is supported
by CLDC?
Answers:
• MIDP
• Foundation
• Personal
7. The constant to create a modal alert is:
Answers:
• Alert.FOREVER
•
AlertType.FOREVER
• Alert.MODAL
• AlertType.ALWAY
8. The version of CLDC in a JAD file can be
known by the:
Answers:
• MIDlet-Configuration
•
Microedition-Configuration
•
MIDP-Configuration
• Configuration
9. The RecordStore can be shared among
multiple MIDlets.
Answers:
• True
• False
10. State whether true or false:
A MIDlet can retrieve its environment
properties.
Answers:
• True
• False
11. Which of the following are not Java ME
Configurations?
Answers:
• Connected
Device Configuration
• Connected
Restricted Configuration
• Connected
Limited Device Configuration
• Common
Legitimate Device Configuration
12. Which of the following methods would be
suitable in opening a connection using the Generic Connection framework?
Answers:
• connect(url)
•
Connector.open(url)
•
Network.open(url)
• conopen(url)
13. SMS Push is not required for JTWI.
Answers:
• True
• False
14. Which of the following statements
regarding configuration in Java ME is incorrect?
Answers:
• It is defined
by the Java Community Process
• It is not
subjected to compatibility tests
• It specifies
the minimum Java libraries required for a particular set of devices
• It specifies
the minimum virtual machine capabilities required for a particular set of
devices
15. For a device to be JTWI MMAPI enabled, it
must support:
Answers:
• 16 Bit KHz
color PCM (video)
• 16 Bit KHz mono
PCM (audio)
• 8 Bit KHz mono
PCM (audio)
• 8 Bit KHz color
PCM (video)
16. Which of the following in CLDC is not
derived from J2SE?
Answers:
• Vector
• Stack
• Hashtable
• ArrayList
• Enumeration
17. The CLDC properties are defined in:
Answers:
•
microedition.platform
•
microedition.profiles
•
microedition.configuration
•
microedition.reflection
18. Which of the following authmodes can be
used to share a RecordStore between multiple MIDlets?
Answers:
• AUTHMODE_ANY
• AUTHMODE_SHARED
• AUTHMODE_PUBLIC
• A RecordStore
cannot be shared between multiple MIDlets
19. Which of the following statements are
correct regarding CLDC security?
Answers:
• The J2SE
security model is too big to be implemented in J2ME
• It defines
low-level virtual machine security
• It defines
high-level virtual machine security
• It defines
application-level security
20. Which of the following image formats is
supported by JTWI 1.0?
Answers:
• JPEG and GIF
• PNG
• TIFF and PNG
• PNG and JPEG
21. Which of the following packages constitute
the Java ME?
Answers:
• JCP
• Configuration
• Profiles
• Optional
packages
22. Which of the following statements is
correct regarding RecordStores?
Answers:
• A call to
RecordStore.deleteRecord will allow the recordID to be reused
• When updating a
record, another user can update the same record at the same time
• All RecordStore
operations are atomic, synchronized, and serialized
23. The character limit for an SMS Text
message is:
Answers:
• 70 characters
• 160 characters
• Whether it is
160 or 70 characters depends on the encoding
24. Which of the following is not the
characteristic feature of the target devices of CDC?
Answers:
• They have a
minimum of 512KB ROM
• They support
the complete JVM specification
• They are
network enabled
• They have a
minimum of 512KB RAM
25. 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. }
Answers:
• There is an
error on line 8
• There is an
error on line 18
• There is an
error on line 19
26. According to JTWI, what is the standard
size for a MIDlet jar file?
Answers:
• 32KB
• 128KB
• 64KB
• 16KB
27. According to JTWI, what is the standard
size for a JAD file?
Answers:
• 32KB
• 128KB
• 64KB
• 5KB
28. Which of the following devices is served
by CLDC?
Answers:
• PDAs and
Communicators
• Phones and
Pagers
• Embedded
Devices
29. Which of the following could be the
reasons for the introduction of the Generic Connection framework?
Answers:
• In J2SE Networking
classes, the total size was greater than 200Mb
• J2SE Networking
classes assume TCP/IP is available
• Both of the
above
30. Mids server should only download data
which has a MIME type of:
Answers:
•
text/vnd.sun.j2me.app-configuration
• text/vnd.sun.j2me.app-description
•
text/vnd.sun.j2me.domain-configuration
•
text/vnd.sun.j2me.domain-description
31. Identify the incorrect statement regarding
CLDC:
Answers:
• It enables
dynamic downloading of applications and content to small devices
• It is a minimum-footprint
application development platform for resource constrained connected devices
• It enables
third-party software development for small devices
• It is not
standardized through the Java Community Process
32. Which of the following profiles give full
AWT and applet support?
Answers:
• Personal
• Foundation
• RMI
• All of the
above
33. Which of the following is used to specify
the Push enable MIDlets?
Answers:
•
Midlet-Push-<y>
•
Midlet-enable-<n>
• Midlet-Push-<n>
•
Midlet-enable-<y>
34. Which of the following migration of codes
is possible?
Answers:
• CDC-->CLDC
• CLDC-->CDC
• MIDP-->CDC
35. Which of the following is designed for
single-processor desktop environments that require faster start-up time and a smaller
memory footprint?
Answers:
• CLDC HotSpot
Implementation
• Java HotSpot
Client
• Java HotSpot
Server
36. Which of the following statements are
correct regarding Xlet application programming model?
Answers:
• Xlets must have
GUI, whereas standalone application may have or may not have GUI
• It is very
similar to the applet application programming model
• It is possible
only to run single Xlet application
• The lifecycle
of Xlet is init, start, stop and destroy, whereas for stand-alone application
there is main and exit only
37. Which of the following is designed for
very small memory scenarios, typically 128 KB to 512 KB for the Java
application environment?
Answers:
• CDC HotSpot
Implementation
• CLDC HotSpot
Implementation
• Java HotSpot
Client
38. The minimum number of threads supported by
JTWI complaint implementations are:
Answers:
• 5
• 10
• 16
• 32
39. Which of the following functions fall
under the scope of J2ME profiles?
Answers:
• Application
installation and life-cycle management
• Event Handling
• Database
Support
• High-level
Application Model
• User Interface
Support
• All of the
above
40. 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?
Answers:
• CDC HotSpot
Implementation
• CLDC HotSpot
Implementation
• Java HotSpot
Client
• Java HotSpot
Server
41. In J2ME, the approximate number of classes
taken from J2SE java.util is:
Answers:
• 16
• 23
• 8
• 30
42. In J2ME, the approximate number of classes
taken from J2SE java.io is:
Answers:
• 18
• 13
• 22
• 30
43. Which of the following form a part of
CLDC?
Answers:
• Event handling
• Database
support
• Additional I/O
and networking libraries
• Security
features
44. The following are the two statements
related to Java Community Process:
Statement X: A Java specification begins life
as a Java Community Process
Statement Y: The specifications for Java standard,
enterprise and micro platforms are developed under the direction of JCP
Which of the following options is correct?
Answers:
• Statement X is
incorrect and Statement Y is correct
• Statement X is
correct and Statement Y is incorrect
• Both Statements
X,Y are correct
• Both Statements
X,Y are incorrect
45. Which of the following methods are defined
as a part of CLDC Internationalization?
1.new InputStreamReader(InputStream)
2.new InputStreamReader( InputStream,String)
3.new OutputStreamWriter(OutputStream)
4.new OutputStreamWriter(OutputStream, String)
Answers:
• 1,2
• 1,3
• 2,3,4,
• 1,2,3,4
46. Which of the following statements with
respect to Java ME profiles is incorrect?
Answers:
• They are
defined through the Java Community Process initiative
• They are
subject to a compatibility test
• They are a set
of APIs which support a configuration for all devices
• They are
subsets of two configurations, the Connected Limited Device Configuration
(CLDC) and the Connected Device Configuration (CDC)
47. State whether true or false:
Migration of code from J2SE to CDC would be a
straight forward process.
Answers:
• True
• False
48. Which of the following is designed for resource-constrained
devices like consumer products and embedded devices?
Answers:
• CDC HotSpot
Implementation
• CLDC HotSpot
Implementation
• Java HotSpot
Client
• Java HotSpot
Server
49. An attribute is defined in both JAD and
MIDlet JAR files. Which one will take precedence over the other?
Answers:
• The same
attributes cannot be specified in both the files
• JAR file
• JAD file
50. Which of the following are a part of the
CLDC expert group?
Answers:
• Nokia
• Motorola
• Sony
• Ericsson
• Symbian
• All of the
above
• Only a, b and e
51. Which of the following is true for
Technology Compatibility Kit(TCK)?
Answers:
• TCK is
applicable in CLDC only
• TCKs are
developed and licensed by the JSR specification lead
• TCK is a test
suite that verifies whether an implementation is compliant with a given JSR
52. Which of the following capabilities are
provided to device manufacturers by embedded Java technology?
Answers:
• A familiar
object model based on C++
• A rich set of
functionality for developers including networking, security, graphics,
database, and XML support
• Optimizing for
devices with no GUI and intermittent networking
• A single
Platform Support
53. Which of the following devices is served
by CDC?
Answers:
• PDAs and
Communicators
• Phones and
Pagers
• Smart Cards
• Embedded
Devices
54. Which of the following statements is
incorrect regarding the Generic Connection framework?
Answers:
• The central
idea is to treat everything as a URL
• Protocols are
defined by profiles
• A new set of
classes are defined for CLDC
• CLDC defines
basic network types and mandates the network protocols
55. Which of the following are the optional
packages available with CDC?
Answers:
• RMI Optional
Package
• JDBC Optional
Package
• Multimedia
Optional Package
56. The MIDlet permission is defined in a JAD
file using __________.
Answers:
•
Microedition-Permissions
•
MIDP-Permissions
•
Midlet-Permissions
•
MIDlet-Configuration
57. Which of the following features are absent
in CLDC as compared to JVM?
Answers:
• Floating point
calculations
• Error Handling
• Garbage
Collection
• Object
finalization
58. MIDP specification requires support for
which of the following auth schemes?
Answers:
• Digest
• Form
• Basic
59. The CLDC specific classes are defined in a
package called:
Answers:
• javax.cldc.io
•
javax.configuration.util
• javax.j2me.util
•
javax.microedition.io
60. The default mode for an open connection
is:
Answers:
• READ
• WRITE
• READ_WRITE
• Any of the
above
61. Which of the following fall under the scope
of CLDC?
Answers:
• Core Java
Libraries
• Profile
Configuration
• High-level
Application Model
• User Interface
Support
62. What would be the values for boxes 1 and 2
respectively in the given Generic Framework figure?
Answers:
• Content
connection and stream connection
• Stream
connection and content connection
• Data Notifier
and stream connection
63. The callback method that is invoked for a
specific item event is _____________.
Answers:
•
itemEventFired(ItemEvent)
•
itemStateChanged(Item)
•
itemEventFired(Item)
•
itemStateChanged(ItemEvent ie)
64. Which of the following is in sync with the
sandbox model?
Answers:
• Java class
files have been properly verified and guaranteed to be valid Java applications
• Access to
native functions is allowed
• Only a limited,
predefined set of Java APIs are available to the application programmer
• The programmer
can override the standard class loading mechanism or the system classes of the
VM
• The programmer
can download new libraries containing the native code
65. Which of the following is not required for
JTWI?
Answers:
• WMA 1.1
• CLDC 1.1
• MIDP 2.0
• MMAPI 1.1
66. Which of the following features would the
target devices for CLDC have?
Answers:
• They have a
128KB to 512KB of memory
• They are often
battery powered
• They have a
processor speed of 6MHZ-16MHZ
• They often have
a limited bandwidth network connection (9600)
67. According to JTWI, what is the recommended
screen size?
Answers:
• 96 x 54 (12 bit
color depth)
• 96 x 54 (1 bit
color depth)
• 125 x 125 (1
bit color depth)
• 125 x 125 (12
bit color depth)
68. According to JTWI, what is the recommended
size for a heap?
Answers:
• 256KB
• 128KB
• 64KB
• 16KB
69. Which of the following is a CDC based
profiles?
Answers:
• Foundation
• PDA
• MID