1.

Which statement is true about the DSYNC constant defined in standardopenoptions enums?

 
2.
Given the following code fragment: public static void getInfo() { //insert code here List fontCatalog = new ArrayList(); fontCatalog.add("Algerian"); fontCatalog.add("Cambria"); fontCatalog.add("Lucida Bright"); category.put("firstCategory",fontCatalog); List entrySet = new ArrayList(category.entrySet()); Iterator it = entrySet.iterator(); while(it.hasNext()) { System.out.println(it.next)); } } Which two code fragments, when inserted independently at line **, enable the code to compile?
3.
Given:
ConcurrentMap
partList = new ConcurrentHashMap<> ();
Which fragment puts a key/value pair in partList without the possibility of overwriting an existing key?
4.
Which three objects must a vendor provide implementations in its JDBC driver?
5.
Given:
public class MyGrades {
private final List
}
}
System.out.println("The average is: " + sum/(i+1));
// release __________ lock Line ***
}
sum += myGrades.get(i);
for (i = 0; i < myGrades.size(); i++) {
int i = 0;
double sum = 0;
// acquire _______ lock Line **
public void averageGrades() {
}
*/

lock and modify
/*
public void addGrade(Integer grade) {
private final ReadWriteLock rwlock = new ReentrantReadWriteLock();
();
myGrades = new ArrayList
Which pair's statements should you insert at line ** and line *** (respectively) to acquire and release the most appropriate lock?
6.
Which two methods are defined in the FileStore class print disk space information?
7.
Given the code fragment:
public static void main(String[] args) {
Path file = Paths.get("D:\\company\\report.txt");
try (SeekableByteChannel sbc = Files.newByteChannel(file,new OpenOption[] sbc.position(5);
sbc.truncate(30);
} catch (IOException e) {
System.err.printin("Caught IOException: " + e.getMessage () } ; }
}
What is the result if the report.txt file contains
Welcome to the world of Java?
8.
What is the minimum SQL standard that a JDBC API implementation must support?
9.
Which two fragments can be combined into a statement that returns an ExecuteService instance?
10.
Given the code fragment: private static void copyContents (File source, File target) { try {inputStream fis = new FileInputStream(source); outputStream fos = new FileOutputStream (target); byte [] buf = new byte [8192]; int i; while ((i = fis.read(buf)) != -1) { fos.write (buf, 0, i); } //insert code fragment here. Line ** System.out.println ("Successfully copied"); } Which code fragments, when inserted independently at line **, enable the code to compile?