無料で使える1Z0-819サンプル問題で100%カバー率のリアル試験問題(更新された297問あります) [Q75-Q97]

Share

無料で使える1Z0-819サンプル問題で100%カバー率のリアル試験問題(更新された297問あります)

今すぐダウンロード!リアルOracle 1Z0-819試験問題集テストエンジン試験問題

質問 # 75
Given:

Which is true about line 1?

  • A. If the value is not present, a NullPointerException is thrown at run time.
  • B. If the value is not present, a NoSuchElementException is thrown at run time.
  • C. It always executes the System.out::print statement.
  • D. If the value is not present, nothing is done.

正解:D

解説:


質問 # 76
Given the declaration:

In which two locations is it legal to apply the @Resource annotation?

  • A. Loc4
  • B. Loc3
  • C. Loc2
  • D. Loc2
  • E. Loc1

正解:B、D


質問 # 77
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(name="Customer1", priority=100)
  • C. @Resource(priority=0)
  • D. @Resource(name="Customer1")
  • E. @Resource

正解:A、C


質問 # 78
Given:

Assume the file on path does not exist. What is the result?

  • A. The compilation fails.
  • B. /u01/work/filestore.txt is deleted.
  • C. Exception
  • D. /u01/work/filestore.txt is not deleted.

正解:A

解説:


質問 # 79
Given:

What action ensures successful compilation?

  • A. Replace int c; with private final int c;.
  • B. Replace int c; with private int c;.
  • C. Replace enum Color with public enum Color.
  • D. Replace public Color(int c) with private Color(int c).
  • E. Replace enum Color implements Serializable with public enum Color.

正解:D

解説:


質問 # 80
Given:

Which two changes need to be made to make this class compile? (Choose two.)

  • A. Change Line 1 to extend java.lang.AutoCloseable:public interface API extends AutoCloseable {
  • B. Change Line 2 access modifier to protected:protected void checkValue(Object value)throws IllegalArgumentException;
  • C. Change Line 1 to a class:public class API {
  • D. Change Line 1 to an abstract class:public abstract class API {
  • E. Change Line 2 to an abstract method:public abstract void checkValue(Object value)throws IllegalArgumentException;

正解:C、E


質問 # 81
A bookstore's sales are represented by a list of Sale objects populated with the name of the customer and the books they purchased.
public class Sale {
private String customer;
private List<Book> items;
// constructor, setters and getters not shown
}
public class Book {
private String name;
private double price;
// constructor, setters and getters not shown
}
Given a list of Sale objects, tList, which code fragment creates a list of total sales for each customer in ascending order?

  • A. Option C
  • B. Option D
  • C. Option B
  • D. Option A

正解:A


質問 # 82
Which is true?

  • A. The code compiles and runs successfully but with a wrong answer (i.e., a bug).
  • B. Code compiles but throws a runtime exception when run.
  • C. It prints 666.
  • D. The code does not compile successfully.

正解:B


質問 # 83
Given:

What is the result?

  • A. The compilation fails at line 8.
  • B. The compilation fails at line 9.
  • C. Hello World
  • D. The compilation fails at line 2.

正解:C

解説:


質問 # 84
Given:

Which option should you choose to enable the code to print Something happened?

  • A. Add extends Exception on line 1.
    Add extends Exception on line 2.
  • B. Add extends GeneralException on line 1.
    Add extends Exception on line 2.
  • C. Add extends Exception on line 1.
    Add extends GeneralException on line 2.
  • D. Add extends SpecificException on line 1.
    Add extends GeneralException on line 2.

正解:C

解説:


質問 # 85
Given:

What is the result?

  • A. Joe Bloggs
  • B. p1
  • C. The compilation fails due to an error in line 1.
  • D. null

正解:C

解説:


質問 # 86
Given:

Which two are correct? (Choose two.)

  • A. Replacing forEach() with forEachOrdered(), the program prints 2 1 3 4 5.
  • B. Replacing forEach() with forEachOrdered(), the program prints 2 1 3 4 5, but the order is unpredictable.
  • C. The output will be exactly 2 1 3 4 5.
  • D. The program prints 1 4 2 3, but the order is unpredictable.
  • E. Replacing forEach() with forEachOrdered(), the program prints 1 2 3 4 5.

正解:D、E

解説:


質問 # 87
You replace the code on line 1 to use ParallelStream.

Which one is correct?

  • A. The compilation fails.
  • B. A NoSuchElementException is thrown at run time.
  • C. The code may produce a different result.
  • D. The code will produce the same result.

正解:C


質問 # 88
Assuming the Widget class has a getPrice method, this code does not compile:

Which two statements, independently, would allow this code to compile? (Choose two.)

  • A. Replace line 5 with widgetStream.filter(a > ((Widget)a).getPrice() > 20.00).
  • B. Replace line 1 with List<Widget> widgetStream = widgets.stream();.
  • C. Replace line 4 with Stream<Widget> widgetStream = widgets.stream();.
  • D. Replace line 5 with widgetStream.filter((Widget a) > a.getPrice() > 20.00).

正解:A、C


質問 # 89

And the code fragment:

Which situation will occur on code fragment execution?

  • A. Starvation
  • B. Deadlock
  • C. Race Condition
  • D. Livelock

正解:A


質問 # 90
Given:

What is known about the Sportscar class?

  • A. The Sportscar class is a subclass of Automobile and inherits its methods.
  • B. The Sportscar class inherits the setTurbo method from the superclass Automobile.
  • C. The Sportscar subclass cannot override setTurbo method from the superclass Automobile.
  • D. The Sportscar class is a superclass that has more functionality than the Automobile class.

正解:A


質問 # 91
Which line of code results in a compilation error?

  • A. line n4
  • B. line n2
  • C. line n1
  • D. line n3

正解:A


質問 # 92
Given the code fragment:
Path source = Paths.get("/repo/a/a.txt");
Path destination = Paths.get("/repo");
Files.move(source, destination); // line 1
Files.delete (source); // line 2
Assuming the source file and destination folder exist, what Is the result?

  • A. a.txt is renamed repo.
  • B. A java.nio.file.NoSuchFileException is thrown on line 2.
  • C. A copy of /repo/a/a.txt is moved to the /repo directory and /repo/a/a.txt is deleted.
  • D. A java.nio.file.FileAlreadyExistsException is thrown on line 1.

正解:C


質問 # 93
Given:

It is required that if p instanceof Pairthen p.isValid()returns true.
Which is the smallest set of visibility changes to insure this requirement is met?

  • A. setLeftand setRightmust be protected.
  • B. left, right, setLeft, and setRightmust be private.
  • C. leftand rightmust be private.
  • D. isValidmust be public.

正解:D


質問 # 94
Given:

What is the result?

  • A. Working
  • B. Unknown
  • C. WorkingUnknown
  • D. The compilation fails.
  • E. Tuesday
  • F. TuesdayUnknown

正解:B

解説:


質問 # 95
Given:

What is the expected result of javac?

  • A. javac fails to compile the class and prints the error message, C:\workspace4\Mycar.java:1:error:
    expected import java.lang
  • B. javac fails to compile the class and prints the error message, C:\workspace4\Mycar.java:1:error: package java does not exist
  • C. javac fails to compile the class and prints the error message, Error: Could not find or load main class Mycar.class
  • D. javac compiles Mycar.java without errors or warnings.

正解:D


質問 # 96
Given:

What is the result?

  • A. The compilation fails due to an error in line 3.
  • B. The compilation fails due to an error in line 5.
  • C. The compilation fails due to an error in line 2.
  • D. The compilation fails due to an error in line 4.
  • E. 0
  • F. 1
  • G. The compilation fails due to an error in line 1.

正解:E


質問 # 97
......

最新1Z0-819テスト問題集を試そう!更新されたOracle試験が合格できます:https://www.goshiken.com/Oracle/1Z0-819-mondaishu.html

検証済み!1Z0-819問題集と解答で1Z0-819テストエンジン正確解答付き:https://drive.google.com/open?id=1ub9Ais00hifCRbsKFEi8E_bhbtgVOtaq