最新の1z0-809試験問題集でOracle試験にはトレーニングを提供しています [Q53-Q78]

Share

最新の1z0-809試験問題集でOracle試験にはトレーニングを提供しています

合格できるOracle Java SE 8 Programmer IIのPDF問題集は最近更新された195問あります


Oracle 1z0-809 認定試験の出題範囲:

トピック出題範囲
トピック 1
  • インスタント、期間、期間、および時間単位を使用して日付ベースおよび時間ベースのイベントを定義および作成および管理します
  • ラムダ式を使用してコレクションをフィルタリングします
トピック 2
  • メソッドを含む列挙型と列挙型のコンストラクターを使用する
  • ポリモーフィズムを実装する
  • ジェネリッククラスを作成して使用する
トピック 3
  • Arraylist、Treeset、Treemap、およびArraydequeオブジェクトを作成して使用する
  • オブジェクトクラスからハッシュコード、Equals、およびTostringメソッドをオーバーライドする
トピック 4
  • Findfirst、Findany、Anymatch、Allmatch、Nonematchを含むストリームクラスの検索メソッドを使用してデータを検索する
トピック 5
  • ストリームインターフェイスとストリームパイプラインの説明
  • 静的内部クラス、ローカルクラス、ネストされたクラス、匿名内部クラスを含む内部クラスの作成
トピック 6
  • インターフェイスを宣言、実装、拡張するコードを開発し、@ Overrideアノテーションを使用する
  • オプションのクラスを使用するコードを開発する
トピック 7
  • 可視性修飾子と構成を含む継承を実装する
  • ストリームでメソッド参照を使用する
トピック 8
  • Localdate、Localtime、Localdatetimeを使用して、日付と時刻の組み合わせを含む単一のオブジェクトへの日付ベースおよび時刻ベースのイベントを作成および管理します
トピック 9
  • 関数型インターフェースのプリミティブバージョンを使用するコードを開発する
  • 抽象クラスとメソッドを使用するコードを開発する
トピック 10
  • Catch、Multi-Catch、Finally句を使用する
  • Stream APIでFlatmap()メソッドを使用する
  • Finalキーワードを使用するコードを開発する
トピック 11
  • 関数型インターフェースのバイナリバージョンを使用するコードを開発する
  • Try-With-Resourcesステートメントで自動クローズリソースを使用する
トピック 12
  • Collectメソッドを使用して結果をコレクションに保存し、Collectorsクラスを使用してグループ
  • パーティションデータを保存する
トピック 13
  • ブロック、変数、メソッド、およびクラスの初期化に静的キーワードを使用するコードを開発する
トピック 14
  • タイムゾーン全体の日付と時刻を処理し、フォーマットの日付と時刻の値を含む夏時間の結果として生じる変更を管理します
トピック 15
  • ストリームデータメソッドと計算メソッドを使用するコードを開発する
  • ストリームとリストのForeachメソッドを使用して反復する
トピック 16
  • シングルトンクラスと不変クラスを作成して使用する
  • Java.Util.ComparatorとJava.Lang.Comparableインターフェイスを使用する
トピック 17
  • 述語、コンシューマー、関数、サプライヤーなど、Java.Util.Functionパッケージに含まれている組み込みインターフェースを使用する
トピック 18
  • Map()メソッドのプリミティブバージョンを含むPeek()およびMap()メソッドを使用してオブジェクトからデータを抽出するコードを開発する

 

質問 53
Given:
final class Folder { //line n1
//line n2
public void open () {
System.out.print("Open");
}
}
public class Test {
public static void main (String [] args) throws Exception {
try (Folder f = new Folder()) {
f.open();
}
}
}
Which two modifications enable the code to print Open Close? (Choose two.)

  • A. Replace line n1 with:
    class Folder extends Closeable {
  • B. At line n2, insert:
    final void close () {
    System.out.print("Close");
    }
  • C. Replace line n1 with:
    class Folder implements AutoCloseable {
  • D. At line n2, insert:
    public void close () throws IOException {
    System.out.print("Close");
    }
  • E. Replace line n1 with:
    class Folder extends Exception {

正解: C,D

 

質問 54
Given the code fragment:

Which three lines fail to compile?

  • A. line 9
  • B. line 10
  • C. line 11
  • D. line 7
  • E. line 12
  • F. line 8

正解: B,D,E

 

質問 55
Given the code fragment:
Stream<List<String>> iStr= Stream.of (
Arrays.asList ("1", "John"),
Arrays.asList ("2", null)0;
Stream<<String> nInSt = iStr.flatMapToInt ((x) -> x.stream ());
nInSt.forEach (System.out :: print);
What is the result?

  • A. 1John2null
  • B. A compilation error occurs.
  • C. A NullPointerException is thrown at run time.
  • D. 0

正解: B

 

質問 56
Which statement is true about java.time.Duration?

  • A. It tracks time zones.
  • B. It defines time-based values.
  • C. It defines date-based values.
  • D. It preserves daylight saving time.

正解: B

 

質問 57
Given:

Which option fails?

  • A. Foo<Object, Object> percentage = new Foo<Object, Object>("Steve", 100);
  • B. Foo<String, String> grade = new Foo <> ("John", "A");
  • C. Foo<String, Integer> mark = new Foo<Object, Object> ("Steve", 100);
  • D. Foo<String, String> pair = Foo.<String>twice ("Hello World!");

正解: A

 

質問 58
Given the following code for the classes MyException and Test:

What is the result?

  • A. A compile time error occurs at line n1.
  • B. AB
  • C. B
  • D. A
  • E. Either A or B

正解: C

 

質問 59
Given the code fragment:

What is the result?

  • A. A compilation error occurs.
  • B. Val:10 Val:20 Val:30
  • C. Val: Val: Val:
  • D. Val:20 Val:40 Val:60

正解: D

 

質問 60
Given the code fragments:
class ThreadRunner implements Runnable {
public void run () { System.out.print ("Runnable") ; }
}
class ThreadCaller implements Callable {
Public String call () throws Exception {return "Callable"; )
}
and
ExecutorService es = Executors.newCachedThreadPool ();
Runnable r1 = new ThreadRunner ();
Callable c1 = new ThreadCaller ();
// line n1
es.shutdown();
Which code fragment can be inserted at line n1to start r1and c1 threads?

  • A. es.submit(r1);
    Future<String> f1 = es.submit (c1);
  • B. es.execute (r1);
    Future<String> f1 = es.execute (c1) ;
  • C. Future<String> f1 = (Future<String>) es.execute(r1);
    Future<String> f2 = (Future<String>) es.execute(c1);
  • D. Future<String> f1 = (Future<String>) es.submit (r1);
    es.execute (c1);

正解: A

 

質問 61
Given the content:

and the code fragment:

What is the result?

  • A. A compilation error occurs.
  • B. The program prints nothing.
  • C. username = Entrez le nom d'utilisateurpassword = Entrez le mot de passe
  • D. username = Enter User Namepassword = Enter Password

正解: C

 

質問 62
Given the code fragment:

What is the result?

  • A. Logged out at: 2015-01-12T21:58:00Z
  • B. Can't logout
  • C. A compilation error occurs at line n1.
  • D. Logged out at: 2015-01-12T21:58:19.880Z

正解: A

 

質問 63
Given the code fragment:
BiFunction<Integer, Double, Integer> val = (t1, t2) -> t1 + t2; //line n1
System.out.println(val.apply(10, 10.5));
What is the result?

  • A. 0
  • B. A compilation error occurs at line n2.
  • C. A compilation error occurs at line n1.
  • D. 20.5

正解: C

 

質問 64
In 2015, daylight saving time in New York, USA, begins on March 8th at 2:00 AM. As a result, 2:00 AM becomes 3:00 AM.
Given the code fragment:

Which is the result?

  • A. 4:00 - difference: 2
  • B. 2:00 - difference: 1
  • C. 4:00 - difference: 3
  • D. 3:00 - difference: 2

正解: A

 

質問 65
Given the code fragment:
9 . Connection conn = DriveManager.getConnection(dbURL, userName, passWord);
1 0. String query = "SELECT id FROM Employee";
1 1. try (Statement stmt = conn.createStatement()) {
1 2. ResultSet rs = stmt.executeQuery(query);
1 3. stmt.executeQuery("SELECT id FROM Customer");
1 4. while (rs.next()) {
1 5. //process the results
1 6. System.out.println("Employee ID: "+ rs.getInt("id"));
1 7. }
1 8. } catch (Exception e) {
1 9. System.out.println ("Error");
2 0. }
Assume that:
The required database driver is configured in the classpath.
The appropriate database is accessible with the dbURL, userName, and passWordexists.
The Employeeand Customertables are available and each table has id column with a few records and the SQL queries are valid.
What is the result of compiling and executing this code fragment?

  • A. compilation fails on line 13.
  • B. The program prints employee IDs.
  • C. The program prints customer IDs.
  • D. The program prints Error.

正解: A

 

質問 66
Given:
class Vehicle implements Comparable<Vehicle>{
int vno;
String name;
public Vehicle (int vno, String name) {
this.vno = vno,;
this.name = name;
}
public String toString () {
return vno + ":" + name;
}
public int compareTo(Vehicle o) {
return this.name.compareTo(o.name);
}
and this code fragment:
Set<Vehicle> vehicles = new TreeSet <> ();
vehicles.add(new Vehicle (10123, "Ford"));
vehicles.add(new Vehicle (10124, "BMW"));
System.out.println(vehicles);
What is the result?

  • A. [10124:BMW, 10123:Ford]
  • B. A compilation error occurs.
  • C. A ClassCastException is thrown at run time.
  • D. [10123:Ford, 10124:BMW]

正解: D

 

質問 67
Given:

and the code fragment:

What is the result?

  • A. A compilation error occurs at line n2.
  • B. A compilation error occurs because the try block doesn't have a catch or finally block.
  • C. The program compiles successfully.
  • D. A compilation error occurs at line n1.

正解: B

 

質問 68
Given:

and this code fragment:

What is the result?

  • A. Open-Close-
  • B. Exception - 1
    Open-Close-
    Open-Close-Open-Close-
  • C. A compilation error occurs at line n1.
  • D. Open-Close-Open-

正解: C

 

質問 69
Given:

and the code fragment:

Which definition of the ColorSorter class sorts the blocks list?

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

正解: A

 

質問 70
Given:
final class Folder { //line n1
/ /line n2
public void open () {
System.out.print("Open");
}
}
public class Test {
public static void main (String [] args) throws Exception {
try (Folder f = new Folder()) {
f.open();
}
}
}
Which two modifications enable the code to print Open Close?

  • A. Replace line n1 with:
    class Folder extends Closeable {
  • B. Replace line n1 with:
    class Folder extends Exception {
  • C. At line n2, insert:
    final void close () {
    System.out.print("Close");
    }
  • D. At line n2, insert:
    public void close () throws IOException {
    System.out.print("Close");
    }
  • E. Replace line n1 with:
    class Folder implements AutoCloseable {

正解: B,E

 

質問 71
Given the code fragment:

Which three code fragments are valid at line n1?

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

正解: A,B,C

 

質問 72
Given the code fragment:

What is the result?

  • A. David
    Allen
    [Susan]
  • B. Susan
    Allen
    [David]
  • C. Susan
    Susan
    [Susan, Allen]
  • D. Susan
    Allen
    [Susan, David]
  • E. David
    David
    [Susan, Allen]

正解: B

解説:
Explanation/Reference:
Explanation:

 

質問 73
Given the code fragment:

Which code fragment, when inserted at line n1, ensures false is printed?

  • A. boolean b = cs.stream() .allMatch(w -> w.equals("Java"));
  • B. boolean b = cs.stream() .anyMatch (w -> w.equals ("Java"));
  • C. boolean b = cs.stream() .findFirst() .get() .equals("Java");
  • D. boolean b = cs.stream() .findAny() .get() .equals("Java");

正解: B

 

質問 74
Given:
public class Test<T> {
private T t;
public T get () {
return t;
}
public void set (T t) {
this.t = t;
}
public static void main (String args [ ] ) {
Test<String> type = new Test<>();
Test type 1 = new Test (); //line n1
type.set("Java");
type1.set(100); //line n2
System.out.print(type.get() + " " + type1.get());
}
}
What is the result?
Java 100

  • A.
  • B. A compilation error occurs. To rectify it, replace line n1with:
    Test<Integer> type1 = new Test<>();
  • C. java.lang.string@<hashcode>java.lang.Integer@<hashcode>
  • D. A compilation error occurs. To rectify it, replace line n2with:
    type1.set (Integer(100));

正解: A

 

質問 75
Given:
class CheckClass {
public static int checkValue (String s1, String s2) {
return s1 length() - s2.length();
}
}
and the code fragment:
String[] strArray = new String [] {"Tiger", "Rat", "Cat", "Lion"}
//line n1
for (String s : strArray) {
System.out.print (s + " ");
}
Which code fragment should be inserted at line n1 to enable the code to print Rat Cat Lion Tiger?

  • A. Arrays.sort(strArray, CheckClass : : new : : checkValue);
  • B. Arrays.sort(strArray, (CheckClass : : new) : : checkValue);
  • C. Arrays.sort(strArray, CheckClass : : checkValue);
  • D. Arrays.sort(strArray, (CheckClass : : new).checkValue);

正解: A

 

質問 76
Which two are benefits of polymorphism?

  • A. Code that is protected from extension by other classes
  • B. More dynamic code at runtime
  • C. More efficient code at runtime
  • D. Faster code at runtime
  • E. More flexible and reusable code

正解: C,E

解説:
https://www.cs.princeton.edu/courses/archive/fall98/cs441/mainus/node5.html

 

質問 77
Given the code fragment:

What is the result?

  • A. Word: why Word: what Word: when
  • B. Word: why Word: why what Word: why what when
  • C. Word: why what when
  • D. Compilation fails at line n1.

正解: C

 

質問 78
......

更新されたテストエンジン練習1z0-809問題集と練習試験で使おう:https://www.goshiken.com/Oracle/1z0-809-mondaishu.html

問題集お試しセット1z0-809テストエンジン問題集トレーニングには195問あります:https://drive.google.com/open?id=1YawHFD-af9fv5fxg2Kp5xEQt2j9PtQf6