1Z0-804 Flashcards
Which three access modifiers are allowed for class and instance members?
public, private, protected
Which element will be retrieved from the path C:\paul\baker\java7\804.java when executing the method getName(3)?
804.java
In a format string, what does the % character specify?
beginning of a format parameter
In a glob pattern, what do the curly braces {} contain?
subpatterns that are comma delimited
In a String, which character is required to escape the initial backslash for Java?
\
Which method of the Object class determines the bucket in which an object is placed in a Hashtable?
hashCode, hashCode returns an int value.
What is the local connection string syntax for the Java DB Network Client Driver?
jdbc:derby://localhost:port/databaseName
Which superclass constructor is implicitly invoked by the compiler in a subclass that does not explicitly invoke a specific superclass constructor?
The constructor with no parameters.
Which two fields are the default values for a ResultSet object?
CONCUR_READ_ONLY and TYPE_FORWARD_ONLY
Using SimpleDateFormat class, what does the pattern letter a represent?
AM/PM marker
In a format string, what does the $ character specify?
The end of an argument location.
String.format(“%1$s %2$s %2$s %3$s”, “a”, “b”, “c”);
Which keyword provides only visibility when using shared variables across multiple threads?
volatile
Which BasicFileAttributeView subinterface supports allowing or disallowing permissions on file system objects for a specified identity other than the owner?
AclFileAttributeView
What is the thread-safe version of the Queue class found in the java.util.concurrent package?
BlockingQueue
What are the patterns supported by Glob Syntax?
<code> * - matches any string of any length, even 0 length ** - similar to * but crosses dir boundaries ? - matches any single character [xyz] - matches letters x,y or z [0-5] - match range {xyz, abc} - matches either xyz or abc </code>
What are the Concurrent Collections?
BlockingQueue (I), ArrayBlockingQueue (C),
LinkedBlockingQueue (C), DelayQueue,
PriorityBlockingQueue, SynchronousQueue,
LinkedBlockingDeque, ConcurrentHashMap,
ConcurrentSkipListMap, ConcurrentSkipListSet,
CopyOnWriteArrayList, CopyOnWriteArraySet
This concurrent collection interface extends the Queue interface. If the queue is empty, it waits for an element to be inserted, and if the queue is full, it waits for an element to be removed from the queue. What is the name of this interface?
BlockingQueue
What classes implement the concurrent collection BlockingQueue interface?
ArrayBlockingQueue, LinkedBlockingQueue, DelayQueue PriorityBlockingQueue SynchronousQueue
This class provides a fixed-size array based implementation of the BlockingQueue interface. What is the name of this concurrent collection class?
ArrayBlockingQueue