Test Yourself on Sun Certified Exam #CX-310-110

Posted on
Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone

Whizlabs, a global leader in IT certification exam preparation, has recently launched the Interim Version of Exam Simulator for SCMAD Certification Exam. The following quiz is an excerpt from the Interim Version of the SCMAD Exam Simulator, which is a powerful tool to ensure your success in the Exam. For a detailed version, visit www.whizlabs.com/scmad/scmad.html.

1. Which of the following statements about the JTWI specification are true? (Select two.)

 

A. JTWI does not define any API.
B. All the devices that implement MIDP 2.0 must also implement JTWI 1.1.
C. Some of the mandatory requirements in MIDP 2.0 have been made optional in JTWI 1.0.
D. A device is JTWI compliant if it supports CLDC 1.1, MIDP 2.0 and WMA 1.1.

 

2. Identify the behavior of the following CLDC 1.1 application.

 

public class MyCLDCApp implements Runnable {
public static void main(String[] args) {
new MyCLDCApp();
}
public MyCLDCApp() {
ThreadGroup myThreadGroup = new ThreadGroup(“CLDCApp”);
Thread first = new Thread(myThreadGroup,this,”first”);
Thread second = new Thread(myThreadGroup,this,”second”);
second.start();
first.start();
}
public void run() {
Thread currentThread = Thread.currentThread();
String name = currentThread.getName();
try {
for(int i = 0; i < 10; i++) {
System.out.println(name);
Thread.sleep(1000);
}
} catch (InterruptedException ignore) {
}
}
}
A. The strings “first” and “second” will be printed 10 times and the program will exit.
B. The application does not compile.
C. The output of the above application is undefined as threading support varies from one device to another.
D. The JVM will exit with a runtime exception since ThreadGroup is not supported.
E. The application runs erroneously as the second thread is started before the first thread.

 

3. Identify the true statements about garbage collection (GC) support in CLDC 1.1. (Select two.)

 

A. System.gc() can be called to explicitly run the Garbage Collector in the same way as in the case of its J2SE counterpart.
B. Runtime.gc() can be called to explicitly run the Garbage Collector in the same way as in the case of its J2SE counterpart.
C. The lack of reference classes aids in easier garbage collection.
D. In case of mission-critical applications, Garbage Collector can be suspended and run at a later point of time.

 

4. A MIDlet suite is signed using X.509 PKI. Identify the statements that are true about the attributes defined in the descriptors and manifest file. (Select two.)

 

A. Attributes defined within the manifest of the JAR are protected by signature.
B. Attributes defined within the application descriptor are protected by signature.
C. Attributes defined in the application descriptor override the values present in the manifest file for the same attributes.
D. The MIDlet.getAppProperty method must return the attribute value from the manifest, if one is defined.

 

5. Consider the following application descriptor file of a MIDP 2.0 application:

 

MIDlet-1: HelloWorld, HelloWorld.png, basic.HelloWorld
MIDlet-Certificate-1-1:base64-encoded-data
MIDlet-Jar-Size: 1448
MIDlet-Jar-URL: HelloWorld.jar
MIDlet-Name: HelloWorld
MIDlet-Permissions: javax.wireless.messaging.sms.send
MIDlet-Permissions-Opt: javax.microedition.io.Connector.sms
MIDlet-Vendor: Acme Inc
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0

 

Identify the true statement about this application.

 

A. It is installed as a trusted MIDlet after the verification of signer certificate and the jar signature.
B. It is installed as an untrusted MIDlet.
C. It fails to install, as MIDlet-Permissions-Opt cannot occur in combination with MIDlet.Permissions.
D. It fails to install, as MIDlet-Jar-URL is an invalid attribute for a JAD file.

 

6. A MIDlet tries to use a secure connection using the following fragment:

 

SecureConnection sc = (SecureConnection)
Connector.open(“ssl://host.com:79”);
InputStream is = sc.openInputStream();
OutputStream os = sc.openOutputStream();
os.write(“rn”.getBytes());
int ch = 0;
while(ch != -1) {
ch = is.read();
}
InputStream second = sc.openInputStream();
second.close();
is.close();
os.close();
sc.close();

 

Identify the behavior of the above fragment. (Select three)

 

A. The getSecurityInfo() method could be used to read the security information associated with this connection.
B. The code will throw an IOException since input stream is opened twice.
C. A CertificateException would be thrown if the secure connection could not be established due to certificate errors.
D. A ConnectionNotFoundException would be thrown if the secure connection could not be established due to certificate errors.

 

7. A MIDlet uses the connection string “ssl://www.acme-scmad.com:79”. Identify the Connection interface, which would be used for creating this connection.

 

A. HttpsConnection
B. SslConnection
C. SecureSocketConnection
D. SecureServerConnection
E. SecureConnection

 

8. Identify the mandatory attributes of a JAD file. (Select two)

 

A. MIDlet-Name
B. Microedition-Profile
C. MIDlet-Jar-URL
D. Microedition-Configuration

 

9. Identify the new security attributes that can be defined in a descriptor file starting from MIDP 2.0. (Select two)

 

A. MIDlet-Permissions-Optional
B. MIDlet-Permissions
C. MIDlet-Security
D. MIDlet-Permissions-Opt

 

10. Identify the valid methods of the RecordListener interface. (Select two)

 

A. recordAdded(RecordStore recordStore, int recordId)
B. recordUpdated(RecordStore recordStore, int recordId)
C. recordChanged(RecordStore recordStore, int recordId)
D. recordRemoved(RecordStore recordStore, int recordId)

 

11. Identify true statements about the Record Management System (RMS) in MIDP 2.0. (Select two)

 

A. Two different MIDlets in the same MIDlet suite can create two different record stores with the same name.
B. Two MIDlets in two different MIDlet suites can create two different record stores with the same name.
C. An application can programmatically find the number of times a record store has been touched (record added, record deleted, or record changed).
D. The record id of a record in a record store can be determined by the developer.

 

12. For a MIDlet application with the entries as defined in the JAD snippet shown below, what will happen if a Push Registry event is received from “http://www.someconnection.com/push4″?

 

MIDlet-Push-1: http://www.someconnection.com/push1, MyMidlet, *
MIDlet-Push-2: http://www.someconnection.com/push2, MyMidlet, *
MIDlet-Push-4: http://www.someconnection.com/push4, MyMidlet, *

 

A. The message will be processed normally.
B. The message will be ignored.
C. An exception will be thrown at Runtime.
D. The user will be asked for permission to accept the event.

 

13. Which method is used to launch a MIDlet at a pre-defined time?

 

A. PushRegistry.registerConnection()
B. PushRegistry.registerAlarm()
C. PushRegistry.notifyMIDlet()
D. PushRegistry.registerMIDlet()

 

14. Identify the true statements about the objects of the Spacer class. (Select two)

 

A.

Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone
cmadmin

ABOUT THE AUTHOR

Posted in Archive|

Comment:

Leave a comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>