Online Access Free 1Z0-805 Exam Questions

Exam Code:1Z0-805
Exam Name:Upgrade to Java SE 7 Programmer
Certification Provider:Oracle
Free Question Number:90
Posted:Oct 12, 2026
Rating
100%

Question 1

Which two scenarios throw FileSystemNotFoundException when the paths.get(URI) method is invoked?

Question 2

Given:
public static void main(String[] args) throws Exception {
try {
processFile();
} catch(Exception e) {
Throwable [] t = e.getSuppressed();
}
}
public static void processFile() throws IOException {
try (FileReader fr = new FileReader"logfilesrc.txt");
FileWriter fw = new FileWriter("logfiledest.txt")) {{
java.util.zip.ZipFile zf = new java.util.zip.ZipFile("alllogs.zip");
System.out.println("Created files for logs");
}
}
The getSuppressed method returns an array of __________.

Question 3

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?

Question 4

Given:
public class DataCache {
private static final DataCache instance = new DataCache ();
public static DataCache getInstance () {
return instance;
}
}
Which design pattern best describes the class?

Question 5

Given:
public class MyGrades {
private final List<Integer> myGrades = new ArrayList<Integer>();
private final ReadWriteLock rwlock = new ReentrantReadWriteLock();
public void addGrade(Integer grade) {
// acquire _______ lock
myGrades.add(grade);
// release __________ lock
}
public void averageGrades() {
// acquire _______ lock Line ** double sum = 0;
int i = 0;
for (i = 0; i < myGrades.size(); i++) {
sum += myGrades.get(i);
}
// release __________ lock Line ***
System.out.println("The average is: " + sum/(i+1));
}
}
Which pair's statements should you insert at lines ** and lines *** (respectively) to acquire and release the most appropriate lock?

Add Comments

Your email address will not be published. Required fields are marked *

insert code
Type the characters from the picture.