Oracle 1Z1-804 Actual Free Exam Questions & Community Discussion
Given the code fragment: Which two try statements, when inserted at line ***, enable the code to successfully move the file info.txt to the destination directory, even if a file by the same name already exists in the destination directory?


Correct Answer: A,E
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Given:
import java.util.concurrent.atomic.AtomicInteger;
public class AtomicCounter {
private AtomicInteger c = new AtomicInteger(0);
public void increment() {
// insert code here
}
}
Which line of code, inserted inside the increment () method, will increment the value of c?
import java.util.concurrent.atomic.AtomicInteger;
public class AtomicCounter {
private AtomicInteger c = new AtomicInteger(0);
public void increment() {
// insert code here
}
}
Which line of code, inserted inside the increment () method, will increment the value of c?
Correct Answer: C
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
A valid reason to declare a class as abstract is to:
Correct Answer: D
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Which two forms of abstraction can a programmer use in Java?
Correct Answer: A,D
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Given:

What is the result?

What is the result?
Correct Answer: E
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Given that myfile.txt contains:

What is the result?

What is the result?
Correct Answer: B
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Which code fragment demonstrates the proper way to handle JDBC resources?
Correct Answer: C
Vote an answer
0
0
0
10

