1Z0-851 試験問題を無料オンラインアクセス

試験コード:1Z0-851
試験名称:Java Standard Edition 6 Programmer Certified Professional Exam
認定資格:Oracle
無料問題数:290
更新日:2026-09-25
評価
100%

問題 1

Given:
3.public class Breaker {
4.static String o = "";
5.public static void main(String[] args) {
6.z:
7.o = o + 2;
8.for(int x = 3; x < 8; x++) {
9.if(x==4) break;
10.if(x==6) break z;
11.o = o + x;
12.}
13.System.out.println(o);
14.}
15.}
What is the result?

問題 2

Which two code fragments will execute the method doStuff() in a separate thread? (Choose two.)

問題 3

Given:
11.static class A {
12.void process() throws Exception { throw new Exception(); }
13.}
14.static class B extends A {
15.void process() { System.out.println("B"); }
16.}
17.public static void main(String[] args) {
18.new B().process();
19.}
What is the result?

問題 4

Given:
11.abstract class Vehicle { public int speed() { return 0; }
12.class Car extends Vehicle { public int speed() { return 60; }
13.class RaceCar extends Car { public int speed() { return 150; } ...
21.RaceCar racer = new RaceCar();
22.Car car = new RaceCar();
23.Vehicle vehicle = new RaceCar();
24.System.out.println(racer.speed() + ", " + car.speed()
25.+ ", " + vehicle.speed()); What is the result?

問題 5

Given:
1.import java.util.*;
2.public class WrappedString {
3.private String s;
4.public WrappedString(String s) { this.s = s; }
5.public static void main(String[] args) {
6.HashSet<Object> hs = new HashSet<Object>();
7.WrappedString ws1 = new WrappedString("aardvark");
8.WrappedString ws2 = new WrappedString("aardvark");
9.String s1 = new String("aardvark");
10.String s2 = new String("aardvark");
11.hs.add(ws1); hs.add(ws2); hs.add(s1); hs.add(s2);
12.System.out.println(hs.size()); } } What is the result?

コメントを追加

あなたのメールアドレスが公開されることはありません。個人情報に関する内容は隠されます *

insert code
画面にある文字を入力してください。