Oracle 1Z1-804 Actual Free Exam Questions & Community Discussion

  • Exam Code/Number: 1Z1-804
  • Exam Name/Title: Java SE 7 Programmer II Exam
  • Certification Provider: Oracle
  • Corresponding Certification: Java and Middleware
  • Exam Questions: 150
  • Updated On: Aug 24, 2026
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?
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?
Correct Answer: E Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Which two are valid initialization statements?
Correct Answer: B,C Vote an answer
Given that myfile.txt contains:

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
Given the code fragment:

What is the result?
Correct Answer: B Vote an answer
0
0
0
10