1. Which statement are characteristics of the >> and >>> operators.
A. >> performs a shift
B. >> performs a rotate
C. >> performs a signed and >>> performs an unsigned shift
D. >> performs an unsigned and >>> performs a signed shift
E. >> should be used on integrals and >>> should be used on floating point
types
C.
2. Given the following declaration
String s = "Example";
Which are legal code?
A. s >>> = 3;
B. s[3] = "x";
C. int i = s.length();
D. String t = "For " + s;
E. s = s + 10;
CDE.
3. Given the following declaration
String s = "hello";
Which are legal code?
A. s >> = 2;
B. char c = s[3];
C. s += "there";
D. int i = s.length();
E. s = s + 3;
CDE.
4. Which statements are true about listeners?
A. The return value from a listener is of boolean type.
B. Most components allow multiple listeners to be added.
C. A copy of the original event is passed into a listener method.
D. If multiple listeners are added to a single component, they all must all
be friends to each other.
E. If the multiple listeners are added to a single component, the order [in]
which listeners are called is guaranteed].
BC.
5. What might cause the current thread to stop executing.
A. An InterruptedException is thrown.
B. The thread executes a wait() call.
C. The
thread constructs a new Thread.
D. A thread of higher priority becomes ready.
E. The thread executes a waitforID() call on a MediaTracker.
ABDE.