Submitted by heartin on Sun, 08/23/2015 - 12:29
Given:
class HelloWorld{
public static void main (String[] args)
{
System.out.println("Hello"+1*2+3);
}
}
A. Compilation fail
B. Compilation succeeds, but execution will fail with an exception
C. Compile and run successfully and print Hello23
D. Compile and run successfully and print Hello123
Submitted by heartin on Sun, 08/23/2015 - 11:57
Given:
public class HelloWorld{
public static void main (String[] args)
{
System.out.println("Hello World!");
}
}
Select 1 option below, if the above class is declared in a file Hello.java:
A. Compilation will fail
B. Compilation succeeds, but execution fails with an exception
C. Compilation and execution succeeds and it prints 'Hello World!'
D. Compilation and execution succeeds and it prints nothing.
Submitted by heartin on Sun, 08/23/2015 - 11:50
Given:
class HelloWorld{
public static void main (String[] args)
{
System.out.println("Hello World!");
}
}
Select 1 option below, if the above class is declared in a file Hello.java:
A. Compilation will fail
B. Compilation succeeds, but execution fails with an exception
C. Compilation and execution succeeds and it prints 'Hello World!'
D. Compilation and execution succeeds and it prints nothing.
Submitted by heartin on Sun, 08/23/2015 - 07:41
Which of the following statements are true?
Select 1 option
A. For any non-null reference obj, the expression (obj instanceof obj) will always yield true.
B. For any non-null reference obj, the expression (obj instanceof Object) will always yield true.
C. For any non-null reference obj, the expression (obj instanceof obj) will always yield false.
D. For any non-null reference obj, the expression (obj instanceof Object) may yield false.
E. None of the above
Submitted by heartin on Sat, 08/22/2015 - 22:54
Which interface must a class implement so that instances of the class are notified after any object added to a session?
A. javax.servlet.http.HttpSessionListener
B. javax.servlet.http.HttpSessionValueListener
C. javax.servlet.http.HttpSessionBindingListener
D. javax.servlet.http.HttpSessionAttributeListener
Pages