Hi Javaranchers ! found these questions in newboone's exam , but answers were not given , please tell me the answers to these three
How you can use the escape notation \u to set the variable c, declared as a char, to the Unicode character whose value is hex 0x30A0?
Another question
What letters get written to the standard output with the following code? class Unchecked {
public static void main(
String[] args) {
try {
method();
} catch (Exception e) {
}
}
static void method() {
try {
wrench();
System.out.println("a");
} catch (ArithmeticException e) {
System.out.println("b");
} finally {
System.out.println("c");
}
System.out.println("d");
}
static void wrench() {
throw new NullPointerException();
}
}
Select all valid answers.
"a"
"b"
"c"
"d"
none of these
If you supply a target object when you create a new
Thread, as in: Thread t = new Thread(targetObject);
What
test of instanceof does targetObject have to pass for this to be legal?
Select the one right answer.
targetObject instanceof Thread
targetObject instanceof Object
targetObject instanceof
Applet targetObject instanceof Runnable
targetObject instanceof String