最新 [2022年04月12日]Oracle 1z0-808リアル試験問題集PDF
1z0-808練習テスト問題は更新された225問題あります
Oracle 1z0-808 認定試験の出題範囲:
トピック | 出題範囲 |
---|---|
トピック 1 |
|
トピック 2 |
|
トピック 3 |
|
トピック 4 |
|
トピック 5 |
|
トピック 6 |
|
トピック 7 |
|
トピック 8 |
|
トピック 9 |
|
トピック 10 |
|
トピック 11 |
|
トピック 12 |
|
質問 43
Given:
And given the code fragment:
Which two modifications enable the code to print the following output?
Canine 60 Long
Feline 80 Short
- A. Replace line n1 with:super ();this.bounds = bounds;
- B. Replace line n2 with:super (type, maxSpeed);this (bounds);
- C. Replace line n1 with:this ("Canine", 60);this.bounds = bounds
- D. Replace line n1 with:this.bounds = bounds;super ();
- E. Replace line n2 with:super (type, maxSpeed);this.bounds = bounds;
正解: A
質問 44
Given the code fragment:
Which code fragment, inserted at line n1, prints The Top element: 30?
- A.
- B.
- C.
- D.
- E.
正解: C
解説:
Explanation
質問 45
A method doSomething () that has no exception handling code is modified to trail a method that throws a checked exception. Which two modifications, made independently, will allow the program to compile?
- A. Catch the exception in the method doSomething().
- B. Cast the exception to a RunTimeException in the doSomething() method.
- C. Declare the exception to be thrown in the doSomething() method signature.
- D. Catch the exception in the method that calls doSomething().
正解: A,C
解説:
Valid Java programming language code must honor the Catch or Specify Requirement. This means that code that might throw certain exceptions must be enclosed by either of the following:
*A try statement that catches the exception. The try must provide a handler for the exception, as described in Catching and Handling Exceptions.
*A method that specifies that it can throw the exception. The method must provide a
throws clause that lists the exception, as described in Specifying the Exceptions Thrown by a Method.
Code that fails to honor the Catch or Specify Requirement will not compile.
質問 46
Given the following classes:
Which two options fail to compile when placed at line n1 of the main method? (Choose two.)
- A. director.salary = 80_000;
- B. manager.budget = 1_000_000;
- C. manager.stockOption = 500;
- D. director.stockOptions = 1_000;
- E. employee.budget = 200_000;
- F. employee.salary = 50_000;
正解: C,E
質問 47
Which code fragment causes a compilation error?
- A. Option D
- B. Option E
- C. Option B
- D. Option C
- E. Option A
正解: A
質問 48
Given the following code for the classes MyException and Test:
What is the result?
- A. Either A or B
- B. A
- C. A compile time error occurs at line n1
- D. A B
- E. B
正解: E
質問 49
Given:
And:
What is the result?
- A. ns = 50 s = 50
ns = 125 s =125
ns = 100 s =100 - B. ns = 50 s = 125
ns = 125 s = 125
ns = 0 s = 125 - C. ns = 100 s =125
ns = 0 s = 125
ns = 125 s = 125 - D. ns = 50 s = 50
ns = 125 s = 125
ns = 0 s = 125
正解: B
解説:
Explanation/Reference:
質問 50
What is the proper way to defined a method that take two int values and returns their sum
as an int value?
- A. int sum(int first, int second) { return first + second; }
- B. int sum(int first, second) { return first + second; }
- C. void sum (int first, int second) { return first + second; }
- D. int sum(int first, int second) { first + second; }
- E. sum(int first, int second) { return first + second; }
正解: A
質問 51
Given the code fragment:
What is the result?
- A. 0 Found
- B. Compilation fails.
- C. 3 Found
- D. 1 Found
正解: C
質問 52
Given the code fragment:
What is the result?
- A. 07-31-2014
- B. An exception is thrown at runtime.
- C. 2014-09-30
- D. 2014-07-31
正解: B
質問 53
Given the code fragment:
And given the requirements:
1. Process all the elements of the array in the reverse order of entry.
2. Process all the elements of the array in the order of entry.
3. Process alternating elements of the array in the order of entry.
Which two statements are true? (Choose two.)
- A. Requirement 2 can be implemented by using the enhanced for loop.
- B. Requirements 2 and 3 CANNOT be implemented by using the standard for loop.
- C. Requirements 1, 2, and 3 can be implemented by using the enhanced for loop.
- D. Requirements 1, 2, and 3 can be implemented by using the standard for loop.
- E. Requirement 3 CANNOT be implemented by using either the enhanced for loop or the standard for loop.
正解: B,D
質問 54
Given the code fragment:
What is the result?
- A. A DateTimeException is thrown at runtime.
- B. Compilation fails
- C. 2012-02-10
- D. 2012-02-11
正解: B
質問 55
Given the code fragment:
And given the requirements:
1. Process all the elements of the array in the order of entry.
2. Process all the elements of the array in the reverse order of entry.
3. Process alternating elements of the array in the order of entry.
Which two statements are true? (Choose two.)
- A. Requirements 1, 2, and 3 can be implemented by using the standard for loop.
- B. Requirements 2 and 3 CANNOT be implemented by using the standard for loop.
- C. Requirement 1 can be implemented by using the enhanced for loop.
- D. Requirements 1, 2, and 3 can be implemented by using the enhanced for loop.
- E. Requirement 3 CANNOT be implemented by using either the enhanced for loop or the standard for loop.
正解: C,E
質問 56
An unchecked exception occurs in a method dosomething()
Should other code be added in the dosomething() method for it to compile and execute?
- A. The Exception must be caught or declared to be thrown.
- B. No other code needs to be added.
- C. The Exception must be declared to be thrown.
- D. The Exception must be caught
正解: B
解説:
Because the Java programming language does not require methods to catch or to specify unchecked exceptions (RuntimeException, Error, and their subclasses), programmers may be tempted to write code that throws only unchecked exceptions or to make all their exception subclasses inherit from RuntimeException. Both of these shortcuts allow programmers to write code without bothering with compiler errors and without bothering to specify or to catch any exceptions. Although this may seem convenient to the programmer, it sidesteps the intent of the catch or specify requirement and can cause problems for others using your classes.
質問 57
Given: class Base {
public static void main(String[] args) {
System.out.println("Base " + args[2]);
}
}
public class Sub extends Base{
public static void main(String[] args) {
System.out.println("Overriden " + args[1]);
}
}
And the commands:
javac Sub.java
java Sub 10 20 30
What is the result?
- A. Overridden 20 Base 30
- B. Base 30
- C. Base 30 Overridden 20
- D. Overridden 20
正解: D
質問 58
You are asked to create a method that accepts an array of integers and returns the highest value from that array.
Given the code fragment:
Which method signature do you use at line n1?
- A. static int findMax (int [] numbers)
- B. static int[] findMax (int max)
- C. public int findMax (int [] numbers)
- D. final int findMax (int [] )
正解: C
質問 59
Given the following two classes: How should you write methods in the ElectricAccount class at line n1 so that the member variable bill is always equal to the value of the member variable kwh multiplied by the member variable rate?
Any amount of electricity used by a customer (represented by an instance of the customer class) must contribute to the customer's bill (represented by the member variable bill) through the method useElectricity method. An instance of the customer class should never be able to tamper with or decrease the value of the member variable bill.
- A. Option D
- B. Option C
- C. Option B
- D. Option A
正解: B,D
質問 60
Given the following two classes:
How should you write methods in the ElectricAccount class at line n1 so that the member variable bill is always equal to the value of the member variable kwh multiplied by the member variable rate?
Any amount of electricity used by a customer (represented by an instance of the customer class) must contribute to the customer's bill (represented by the member variable bill) through the method useElectricity method. An instance of the customer class should never be able to tamper with or decrease the value of the member variable bill.
- A. Option D
- B. Option C
- C. Option B
- D. Option A
正解: B,D
質問 61
......
Oracle 1z0-808問題集で一発合格できる問題を試そう!:https://www.jpntest.com/shiken/1z0-808-mondaishu
1z0-808問題集を掴み取れ![最新2022]Oracle試験問題を提供しています:https://drive.google.com/open?id=148Lkww9HfiUEQJuW03J3XEtN4t89ilmx