Which of the following are marker interfaces?
Each correct answer represents a complete solution. Choose all that apply.
A. The Clonable interface
B. The Serializable interface
C. The Comparable interface
D. The Runnable interface
Which of the following statements about the isCallerInRole() method are true? Each correct answer represents a complete solution. Choose all that apply.
A. It can be called from the PostConstruct and PreDestroy callback methods of a stateful session bean.
B. It is present in the UserTransaction interface.
C. It cannot be called from a message-driven bean.
D. It can be invoked only from the business method of an enterprise bean.
Which of the following circumstances can prevent the execution of code in a finally block? Each correct answer represents a complete solution. Choose two.
A. An exception arising in the try block that precedes the finally block.
B. An exception arising in the finally block itself.
C. No exception condition arising in the try block that precedes the finally block.
D. The use of the System.exit(0); statement in the finally block.
You work as a programmer for PassGuide.Inc. You want to create a servlet filter that stores all request headers to a database for all requests to the Web application's home page "/work.jsp". Which of the following HttpServletRequest methods allows you to retrieve all of the request headers?
A. java.util.Enumeration getRequestHeaders()
B. java.util.Enumeration getHeaderNames()
C. String[] getRequestHeaders()
D. java.util.Iterator getRequestHeaders()
E. java.util.Iterator getHeaderNames()
F. String[] getHeaderNames()
Which of the following permission classes is an abstract class ancestor of all permissions and defines the essential functionalities required for all permissions?
A. java.security.Permissions
B. java.security.PermissionCollection
C. java.security.UnresolvedPermission
D. java.security.Permission
Mark works as a Programmer for InfoNet Inc. He writes the following programs.
1.
package book;
2.
public class read
3.
{
4.
(access modifier) int r1=10;
5.
}
1.
package book1;
2.
import book.read;
3.
class Doread extends read
4.
{
5.
public void test()
6.
{
7.
System.out.println("The value of r1 is." +r1);
8.
}
9.
}
Which of the following access modifiers will be put in the place of the word, (access modifier), to compile
the program successfully?
A. default
B. public
C. protected
D. private
E. volatile
Which of the following elements can be used to obtain a database connection?
A.
B.
C.
D.
E.
Which of the following classes enables a programmer to create an object and protect its confidentiality with a cryptographic algorithm?
A. MAC
B. SealedObject
C. KeyGenerator
D. SecretKeyFactory
Which of the following JAR file options creates and includes a manifest file?
A. -M
B. -v
C. -0
D. -m
Which of the following exceptions will be thrown by the getFeature() method if the feature value cannot be assigned or retrieved?
A. SAXNotSupportedException
B. IllegalArgumentException
C. NullPointerException
D. SAXNotRecognizedException