2026年最新の1z1-809問題集を試そう!更新されたOracle試験合格させます
最新の1z1-809試験問題集でOracle試験にはトレーニングを提供しています
質問 # 73
Given the code fragment:
What is the result?
- A. 0
- B. 1
- C. 2
- D. Compilation fails.
正解:C
質問 # 74
Given the code fragments:
public class Book implements Comparator<Book> {
String name;
double price;
public Book () {}
public Book(String name, double price) {
this.name = name;
this.price = price;
}
public int compare(Book b1, Book b2) {
return b1.name.compareTo(b2.name);
}
public String toString() {
return name + ":" + price;
}
}
and
List<Book>books = Arrays.asList (new Book ("Beginning with Java", 2), new book ( "A
Guide to Java Tour", 3));
Collections.sort(books, new Book());
System.out.print(books);
What is the result?
- A. A compilation error occurs because the Book class does not override the abstract method compareTo ().
- B. An Exceptionis thrown at run time.
- C. [Beginning with Java:2, A Guide to Java Tour:3]
- D. [A Guide to Java Tour:3, Beginning with Java:2]
正解:D
質問 # 75
Given:
public class Counter {
public static void main (String[ ] args) {
int a = 10;
int b = -1;
assert (b >=1) : "Invalid Denominator";
int = a / b;
System.out.println (c);
}
}
What is the result of running the code with the option?
- A. 0
- B. 1
- C. A compilation error occurs.
- D. An AssertionError is thrown.
正解:D
質問 # 76
Given the code fragment:
Assume that:
The required database driver is configured in the classpath.
The appropriate database is accessible with the dbURL, userName, and passWordexists The Employeetable has a column ID of type integer and the SQL query matches one record.
What is the result?
- A. Compilation fails at line 14.
- B. The code prints the employee ID.
- C. Compilation fails at line 15.
- D. The code prints Error.
正解:A
質問 # 77
Given the information: The employee table has 10 records.
Given the code fragment:
What is the result?
- A. deletes the second row and prints the emp_id of the first row
- B. deletes the first row and prints the emp_id of the second row
- C. throws a runtime exception at Line n1
- D. deletes the first row and throws an exception at Line n2
正解:D
質問 # 78
Given the code fragment:
What is the result?
- A. 1 2 3
- B. 1 2 3 4
followed by an ArrayIndexOutOfBoundsException - C. 1 2 3 4
- D. Compilation fails.
正解:A
質問 # 79
Given:
and
Which interface from the java.util.function package should you use to refactor the class Txt?
- A. Supplier
- B. Function
- C. Predicate
- D. Consumer
正解:B
解説:
References:
質問 # 80
Given the code fragment:
and the information:
* The required database driver is configured in the classpath.
* The appropriate database is accessible with the dbURL, username, and passWord exists.
What is the result?
- A. A SQLException is thrown at runtime.
- B. A ClassNotFoundException is thrown at runtime.
- C. The program prints nothing.
- D. The program prints Connection Established.
正解:D
質問 # 81
Given:
and the code fragment:
What is the result?
- A. 2000.0
- B. 1500.0
- C. A compilation error occurs.
- D. 0.0
正解:B
質問 # 82
Given the code fragment:
List<String> codes = Arrays.asList ("DOC", "MPEG", "JPEG");
codes.forEach (c -> System.out.print(c + " "));
String fmt = codes.stream()
.filter (s-> s.contains ("PEG"))
.reduce((s, t) -> s + t).get();
System.out.println("\n" + fmt);
What is the result?
DOC MPEG JPEG
- A. MPEGJPEG
- B. The order of the output is unpredictable.
- C. MPEGJPEG
DOC MPEG MPEGJPEG - D. MPEGMPEGJPEG
MPEGJPEG
正解:C
質問 # 83
Given the code fragments:
and
Which two modifications enable to sort the elements of the empslist? (Choose two.)
- A. Replace line n1 with
class Person extends Comparator<Person> - B. At line n2 insert
public int compareTo (Person p) {
return this.name.compareTo (p.name);
} - C. At line n2 insert
public int compare (Person p1, Person p2) {
return p1.name.compareTo (p2.name);
} - D. Replace line n1 with
class Person implements Comparator<Person> - E. At line n2 insert:
public int compareTo (Person p, Person p2) {
return p1.name.compareTo (p2.name);
} - F. Replace line n1 with
class Person implements Comparable<Person>
正解:B、F
質問 # 84
Given the code fragment:
List<Integer> codes = Arrays.asList (10, 20);
UnaryOperator<Double> uo = s -> s +10.0;
codes.replaceAll(uo);
codes.forEach(c -> System.out.println(c));
What is the result?
- A. 0
- B. 20.0
30.0 - C. A NumberFormatExceptionis thrown at run time.
- D. A compilation error occurs.
正解:B
質問 # 85
Given:
class UserException extends Exception { }
class AgeOutOfLimitException extends UserException { }
and the code fragment:
class App {
public void doRegister(String name, int age)
throws UserException, AgeOutOfLimitException {
if (name.length () <= 60) {
throw new UserException ();
} else if (age > 60) {
throw new AgeOutOfLimitException ();
} else {
System.out.println("User is registered.");
}
}
public static void main(String[ ] args) throws UserException {
App t = new App ();
t.doRegister("Mathew", 60);
}
}
What is the result?
- A. User is registered.
- B. An AgeOutOfLimitException is thrown.
- C. A UserException is thrown.
- D. A compilation error occurs in the main method.
正解:C
質問 # 86
Given the code fragment:
ZonedDateTime depart = ZonedDateTime.of(2015, 1, 15, 3, 0, 0, 0, ZoneID.of("UTC-7")); ZonedDateTime arrive = ZonedDateTime.of(2015, 1, 15, 9, 0, 0, 0, ZoneID.of("UTC-5")); long hrs = ChronoUnit.HOURS.between(depart, arrive); //line n1 System.out.println("Travel time is" + hrs + "hours"); What is the result?
- A. Travel time is 8 hours
- B. An exception is thrown at line n1.
- C. Travel time is 6 hours
- D. Travel time is 4 hours
正解:B
質問 # 87
Given the code fragment:
List<Integer> nums = Arrays.asList (10, 20, 8):
System.out.println (
//line n1
);
Which code fragment must be inserted at line n1to enable the code to print the maximum number in the numslist?
- A. nums.stream().max()
- B. nums.stream().map(a -> a).max()
- C. nums.stream().max(Comparator.comparing(a -> a)).get()
- D. nums.stream().max(Integer : : max).get()
正解:C
質問 # 88
Which statement is true about java.util.stream.Stream?
- A. A stream cannot be consumed more than once.
- B. Streams are intended to modify the source data.
- C. The execution mode of streams can be changed during processing.
- D. A parallel stream is always faster than an equivalent sequential stream.
正解:C
質問 # 89
Given:
What is the result?
- A. A NullPointerException is thrown at runtime.
- B. A StringIndexOutOfBoundsException is thrown at runtime.
- C. The program prints nothing
- D. d
- E. AnArrayIndexOutOfBoundsException is thrown at runtime.
正解:B
質問 # 90
......
更新されたテストエンジン練習1z1-809問題集と練習試験:https://jp.fast2test.com/1z1-809-premium-file.html
合格できるOracle 1z1-809のPDF問題集で最近更新された209問あります:https://drive.google.com/open?id=1pPB-Xw4vsVpzUl8m_pqUEMOj682G1Dyb