Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
 

Oracle 1z0-816 Exam Actual Questions

The questions for 1z0-816 were last updated on July 8, 2024.
  • Viewing page 1 out of 20 pages.
  • Viewing questions 1-4 out of 80 questions

Topic 1 - Exam A

Question #1 Topic 1

Given the code fragment:
Path currentFile = Paths.get(“/scratch/exam/temp.txt”);
Path outputFile = Paths get(“/scratch/exam/new.txt”);
Path directory = Paths.get(“/scratch/”);
Files.copy(currentFile, outputFile);
Files.copy(outputFile, directory);
Files.delete (outputFile);
The /scratch/exam/temp.txt file exists. The /scratch/exam/new.txt and /scratch/new.txt files do not exist.
What is the result?

  • A. /scratch/exam/new.txt and /scratch/new.txt are deleted.
  • B. The program throws a FileaAlreadyExistsException.
  • C. The program throws a NoSuchFileException.
  • D. A copy of /scratch/exam/new.txt exists in the /scratch directory and /scratch/exam/new.txt is deleted.
Reveal Solution Hide Solution   Discussion   2

Correct Answer: C 🗳️

Question #2 Topic 1

Which two are functional interfaces? (Choose two.)

  • A.
  • B.
  • C.
  • D.
  • E.
Reveal Solution Hide Solution   Discussion   3

Correct Answer: CE 🗳️

Question #3 Topic 1

Given the declaration:

Examine this code fragment:
/* Loc1 */ class ProcessOrders { ... }
Which two annotations may be applied at Loc1 in the code fragment? (Choose two.)

  • A. @Resource(priority=100)
  • B. @Resource(priority=0)
  • C. @Resource(name=“Customer1”, priority=100)
  • D. @Resource(name=“Customer1”)
  • E. @Resource
Reveal Solution Hide Solution   Discussion   2

Correct Answer: AB 🗳️

Question #4 Topic 1

Given:

Which two interfaces can be used in lambda expressions? (Choose two.)

  • A. MyInterface1
  • B. MyInterface3
  • C. MyInterface5
  • D. MyInterface2
  • E. MyInterface4
Reveal Solution Hide Solution   Discussion   3

Correct Answer: CD 🗳️

Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
ex Want to SAVE BIG on Certification Exam Prep?
close
ex Unlock All Exams with ExamTopics Pro 75% Off
  • arrow Choose From 1000+ Exams
  • arrow Access to 10 Exams per Month
  • arrow PDF Format Available
  • arrow Inline Discussions
  • arrow No Captcha/Robot Checks
Limited Time Offer
Ends in