Java SE 8 Programmer I練習テスト2024年最新の1z0-808ストレスなしで合格させちゃう! [Q80-Q98]

Share

Java SE 8 Programmer I練習テスト2024年最新の1z0-808ストレスなしで合格させちゃう!

練習Java and Middleware 1z0-808問題集オンライン試験練習テストと詳細な解説付き!


オラクルの1z1-808試験は、基本的な構文および制御構造、オブジェクト指向プログラミングの概念、エラーハンドリングなど、Javaプログラミングに関連する広範なトピックをカバーしています。また、コレクション、ジェネリック、Lambda式などのトピックもカバーしています。この試験は、Javaプログラミング言語を使用して効率的かつ効果的なコードを記述する能力を候補者がテストするよう設計されています。

 

質問 # 80
Given the following classes:

Which two options fail to compile when placed at line n1 of the main method?

  • A. employee.salary = 50_000;
  • B. manager.budget = 1_000_000;
  • C. employee.budget = 200_000;
  • D. manager.stockOption = 500;
  • E. director.salary = 80_000;
  • F. director.stockOptions = 1_000;

正解:C、D


質問 # 81
Which code fragment causes a compilation error?

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

正解:C


質問 # 82
Given the code fragment:
System.out.println(2 + 4 * 9 - 3); //Line 21
System.out.println((2 + 4) * 9 - 3); // Line 22
System.out.println(2 + (4 * 9) - 3); // Line 23
System.out.println(2 + 4 * (9 - 3)); // Line 24
System.out.println((2 + 4 * 9) - 3); // Line 25
Which line of codes prints the highest number?

  • A. Line 21
  • B. Line 25
  • C. Line 24
  • D. Line 23
  • E. Line 22

正解:E

解説:
The following is printed: 35 51 35 26 35


質問 # 83
Given the following code:

What will make this code compile and run?

  • A. Change line 5 to the following: price.price = 4;
  • B. Change line 4 to the following: int price = new simple ();
  • C. Change line 2 to the following: Public int price
  • D. Change line 5 to the following: Price = 4f;
  • E. Change line 5 to the following: Price = (Simple) 4;
  • F. The code compiles and runs properly; no changes are necessary
  • G. Change line 5 to the following: Price = (float) 4:
  • H. Change line 4 to the following: Float price = new simple ();

正解:A

解説:
price.price =4; is correct, not price=4;
The attribute price of the instance must be set, not the instance itself.


質問 # 84
Given the fragment:

What is the result?

  • A. 13480.02
  • B. An exception is thrown at runtime
  • C. Compilation fails
  • D. 13480.0

正解:D


質問 # 85
Given the code format:

Which code fragment must be inserted at line 6 to enable the code to compile?

  • A. Retutn 0;
  • B. Return DBConfiguration;
  • C. Return new DBConfiguration();
  • D. DBConfiguration f;
    return f;

正解:C


質問 # 86
Given the code fragment:

Which code fragment prints blue, cyan, ?

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

正解:A


質問 # 87
Given the code fragment:

What is the result?

  • A. 2012-02-10
  • B. A DateTimeException is thrown at runtime.
  • C. Compilation fails
  • D. 2012-02-11

正解:B


質問 # 88
Given:

And given the code fragment:

What is the result?

  • A. Compilation fails only at line n1
  • B. Null 0 Auto 4W 150 Manual
  • C. Compilation fails at both line n1 and line n2
  • D. Compilation fails only at line n2
  • E. 4W 100 Auto 4W 150 Manual

正解:B


質問 # 89
Given:

What is the result?

  • A. 400 200
  • B. 200 200
  • C. Compilation fails.
  • D. 400 400

正解:A


質問 # 90
Given the code fragment:

What is the result?

  • A. An exception is thrown at runtime.
  • B. 2014/9/30 0:00:00
  • C. 2014/7/31 1:01:00
  • D. 2014-07-31

正解:C


質問 # 91
Given:
public class ColorTest {
public static void main(String[] args) {
String[] colors = {"red", "blue","green","yellow","maroon","cyan"};
int count = 0;
for (String c : colors) {
if (count >= 4) {
break;
}
else {
continue;
}
if (c.length() >= 4) {
colors[count] = c.substring(0,3);
} count++; } System.out.println(colors[count]); } } What is the result?

  • A. Maroon
  • B. Compilation fails
  • C. Yellow
  • D. A StringIndexOutOfBoundsException is thrown at runtime.

正解:B

解説:
The line, if (c.length() >= 4) {, is never reached. This causes a compilation error.
Note: The continue statement skips the current iteration of a for, while , or do-while loop. An unlabeled break statement terminates the innermost switch, for, while, or do-while statement, but a labeled break terminates an outer statement.


質問 # 92
Which statement is/are true?
I. Default constructor only contains "super();" call.
II. We can't use any access modifier with a constructor.
III.
A constructor should not have a return type.

  • A. Only II.
  • B. Only I.
  • C. Only I and III.
  • D. AIL
  • E. Only I and II.

正解:C

解説:
Statement I is correct as the default constructor only contains super0 call
Statement II is incorrect as we can use any access modifier with a constructor.
Statement III is correct as constructor can't have return type, even void.
So option D is correct.
httpsy/docs.oracle.com/javase/tutorial/iava/javaOO/construaors.html


質問 # 93
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 A
  • B. Option D
  • C. Option C
  • D. Option B

正解:D


質問 # 94
Given:

What is the result?

  • A. Object main 1
  • B. An exception is thrown at runtime
  • C. Compilation fails
  • D. int main 1
  • E. String main 1

正解:E


質問 # 95
Which three statements are true about exception handling?

  • A. All subclasses of the Error class are checked exceptions and are recoverable.
  • B. The parameter in a catch block is of Throwable type.
  • C. All subclasses of the Exception class except the RuntimeException class are checked exceptions.
  • D. All subclasses of the RuntimeException class must be caught or declared to be thrown.
  • E. Only unchecked exceptions can be rethrown.
  • F. All subclasses of the RuntimeException class are recoverable.

正解:A、B、C


質問 # 96
Given:

What is the result?

  • A. An exception is thrown at runtime.
    Initialized
  • B. Compilation fails.
  • C. Started
    Initialized
    Initialized
  • D. Started

正解:B


質問 # 97
Given the code fragment:

What is the result?

  • A. No Match
  • B. Match 2
  • C. A NullPointerException is thrown at runtime.
  • D. Match 1

正解:D


質問 # 98
......

時間限定!今すぐ無料アクセス1z0-808練習問題:https://drive.google.com/open?id=1i1-6J88mRMIDb1RzO-JZWWMyqnpfpA8y

最適な1z0-808試験学習資料と準備材料を提供しています:https://jp.fast2test.com/1z0-808-premium-file.html


弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

我々の働いている時間: ( GMT 0:00-15:00 )
月曜日から土曜日まで

サポート: 現在連絡 

English Deutsch 繁体中文 한국어