QUESTION NO: 1
What design pattern does the Drivermanager.getconnection () method characterize?
QUESTION NO: 2
Given the code fragment:
Which statement defines a new DataFormat object that displays the default date format for the UK
A. df = DateFormat.getDateInstance (DateFormat.DEFAULT, Locale(UK));
B. df = DateFormat.getDateInstance (DateFormat.DEFAULT, UK);
C. df = DateFormat.getDateInstance (DateFormat.DEFAULT, Locale.UK);
D. df = new DateFormat.getDataInstance (DataFormat.DEFAULT, Locale.UK);
E. df = new DateFormat.getDateInstance (DateFormat.DEFAULT, Locale(UK));
QUESTION NO: 3
Given the code fragment:
List<Person> pList = new CopyOnWriteArrayList<Person>();
Which statement is true?
A. Read access to the List should be synchronized.
B. Write access to the List should be synchronized.
C. Person objects retrieved from the List are thread-safe.
D. A Person object retrieved from the List is copied when written to.
E. Multiple threads can safely delete Person objects from the List.
QUESTION NO: 4
Given a resource bundle MessageBundle, what is the name of the default bundle file?
QUESTION NO: 5
Which three must be used when using the Java.util.concurrent package to execute a task that
returns a result without blocking?
QUESTION NO: 6
Which three enum constants are defined in FilevisitResult?
QUESTION NO: 7
Which is true regarding the java.nio.file.Path Interface?
A. The interface extends WatchService interface
B. Implementations of this interface are immutable.
C. Implementations of this interface are not safe for use by multiple concurrent threads.
D. Paths associated with the default provider are not interoperable with the java.io.File class.
QUESTION NO: 8
The two methods of course rescue that aggregate the features located in multiple classes are
B. Copy and Paste
E. Virtual Method Invocation
QUESTION NO: 9
Which two statements are true?
A. Implementing a DAO often includes the use of factory.
B. To be implemented properly, factories rely on the private keyword.
C. Factories are an example of the OO principle "program to an interface."
D. Using factory prevents your replication from being tightly coupled with a specific Singleton
E. One step in implementing a factory is to add references from all the classes that the factory will
QUESTION NO: 10
The advantage of a CallableStatement over a PreparedStatement is that it:
A. Is easier to construct
B. Supports transactions
C. Runs on the database
D. Uses Java instead of native SQL
I hope you must have find these questions very helpful. If you want to get complete set of real exam questions and their answer please visit our FAQ's section to know more.