OK folks, don't flame me if I made some errors here
These are first drafts... and this is the first of two sets I will make. I will do more GUI stuff a little later in the week, but this is a start, and covers mainly the first half of the objectives... I hope you will discuss them and I will post the answers later, and/or at least *confirm* that you all have arrived at the correct answer. If you find an error in the question itself, let me know immediately and I'll change it.
Have fun
Oh yeah, I have done a few things a little differently than the real exam:
1) The real exam tells you how many answers to select. I'm not doing that, which means THESE questions are a little more difficult than in the real exam.
2) To keep it smaller, I've made some of my questions have *more* possible answers than in the real exam. So, in the exam you might have several smaller questions on one topic, but I've put them into one big question with a LOT of possible answers.
3) The real exam uses drag and drops, which I can't represent here... but in a couple of questions I ask you to put a letter or mark next to a
word or class name to get you to do the same kind of thing you might have to do in a drag and drop.
4) I did not include much code here, but there IS a lot of code in the real exam. I can't get my VirtualPC working tonight, so I couldn't compile anything and I don't want to mislead you. I'll get things working again before I post the second batch, so the next set will have code.
But the questions here are still VERY representative of the types of questions on the real exam.
==================================
1) Which are true about JTWI 1.0?
A) CLDC 1.1 is the minimum CLDC requirement.
B) CLDC 1.0 is the minimum CLDC requirement.
C) A JTWI-compliant device must support a MIDlet suite JAR size up to 64 KB.
D) A JTWI-compliant device must support a MIDlet suite JAR size up to 128 KB.
E) MIDP 2.0 is required.
F) WMA 1.1 is an optional specification.
==============================
2) Which is true about MMAPI and JTWI?
A) All of MMAPI must be implemented in a JTWI-compliant device.
B) A JTWI device must implement all of the MMAPI, PLUS additional media APIs.
C) A JTWI device must implement a subset, but not all, of the MMAPI.
D) A JTWI device must implement ONLY a subset, and never all, of the MMAPI.
E) A JTWI device must support media types explicitly defined in JTWI, regardless of whether they are specified in MMAPI.
==============================
3) A FAKE drag and drop
Given the list of classes below, put a "B" next to those which exist in both J2SE and CLDC 1.1, put a "C" for those which exist ONLY in CLDC 1.1 (but not in J2SE) and put a "J" next to those which exist ONLY in J2SE (but not in CLDC 1.1).
ArrayList
ThreadGroup
Float
Socket
BufferedOutputStream
Stack
StreamConnection
FileOutputStream
VirtualMachineError
NoClassDefFoundError
IllegalAccessError
==============================
4) Given the MIDlet code:
public void notifyDestroyed() {
System.out.println("foo");
System.exit(0);
System.out.println("bar");
}
What is the result?
(assume that the device has a console for System.out)
A) Compilation fails.
B) "foo" (but not "bar") is sent to the console.
C) Code throws a runtime exception.
D) Both "foo" and "bar" are sent to the console.
E) Compilation succeeds, and the code does not throw an exception, but nothing is output from that method.
==============================
5) Which are true about MIDlets?
A) Classes in one suite have restricted access to classes in a other suites.
B) Classes in one suite have full access to classes in another suite, as long as both suites are trusted.
C) Classes in one suite can never access classes in other suites.
==============================
6) Which are true?
A) A MIDlet can never be installed in an untrusted domain.
B) A MIDlet suite can be installed in an untrusted domain ONLY if the suite is signed with an x.509 PKI certificate.
C) A MIDlet can be installed in an untrusted domain if the suite is authenticated with an invalid cx.509 PKI certificate.
D) a MIDlet can be installed in an untrusted domain if it is not signed with a x.509 PKI certificate.
E) An untrusted suite can request permissions in the JAR manifest.
F) An untrusted suite can never access protected functions.
G) All MIDP 1.0 suites are considered trusted.
H) All CLDC suites are considered trusted.
==============================
7) Which are true?
A) A suite using x.509 PKI authentication must have a midlet-permission JAD attribute.
B) Suites using x.509 PKI authentication must have a security certificate inside the META-INF directory.
C) A suite using x.509 PKI authentication must use base64 encoding for the certificate.
==============================
8) Which connection
String goes with the SocketConnection interface?
A)
socket://:4242 B)
http://foo.sun.com C) socket:162.101.4.100:4242
D)
datagram://:4242 ==============================
9) Which are true?
A) A MIDP 2.0 device is guaranteed to be able to create an HTTP connection to a server that supports HTTP 1.1.
B) A MIDP 2.0 device can NOT create HTTP connections.
C) A MIDP 2.0 device is not required to support HTTP 1.1, but it may.
==============================
10) What is the function of the Application Descriptor?
[on real exam, you would not answer this as an essay, but I didn't have time to come up with good answers for it
]
==============================
11. Which are true?
A) A MIDlet cannot access its manifest.
B) A MIDlet can access its manifest as a system property.
C) A MIDlet can access its manifest using a method from Class.
D) Only a trusted MIDlet can access its manifest.
E) MIDlets are not allowed to have manifests.
==============================
12. [not a question... be preared to read and write a JAD file]
==============================
13. Which are true?
A) A MIDlet suite can have more than one MIDlet.
B) A single JAD file can specify more than one MIDlet.
C) A JAD file specifies the Jar-Size
D) A JAD file does not specify the URL of the jar.
==============================
14) Which is true about push notification?
A) A MIDlet's push() method will be called initially.
B) A MIDlet's startApp() will be called initially.
C) A MIDlet's pushNotification() will be called initially
D) A MIDlet's pushListener() will be called initially.
E) A MIDlet's init() method will be called initially.
F) A MIDlet's notifyConnection() will be called initially.
==============================
15) Given a push connection String:
socket://:42, foo.Bar, 168.2 ? ?.*.?
which of these addresses could push notifications to a MIDlet?
A) 168.20.2.1
B) 168.2.2.100
C) 168.200.27.1
D) 168.200.27.1
E) 168.200.1.1
F) 168.200.100.1
==============================
16) Put an "H" next to the code or class from the high-level MIDP 2.0 API, and and an "L" next to those from the low-level API. Put a "E" for those things that could apply to either high-level or low-level, depending on how they're used.
When we use "...", assume that whatever you don't see is correct.
new Command(...);
Form f = new Form();
graphicsObject.setColor(...);
new Canvas(...);
paint(Graphics g) { }
Sprite
LayerManager
==============================
OK, now it's your turn folks, so GET BUSY working on these ; )
cheers,
Kathy
"Just a J2ME girl living in a
J2EE world"