IT認証試験問題集
毎月、ITshikenは1500人以上の受験者が試験準備を助けて、試験に合格するために受験者にご協力します
 ホームページ / 1Z0-851 問題集  / 1Z0-851 問題練習

Oracle 1Z0-851 問題練習

Java Standard Edition 6 Programmer Certified Professional Exam 試験

最新更新時間: 2019/07/10,合計263問。

平成から令和へ:1Z0-851 最新真題を買う時、日本語版と英語版両方を同時に獲得できます。

実際の問題集を練習し、試験のポイントを了解し、テストに申し込むするかどうかを決めることができます。

さらに試験準備時間の35%を節約するには、1Z0-851 問題集を使用してください。

 / 18

Question No : 1
Given:
public class TestOne {
public static void main (String[] args) throws Exception {
Thread.sleep(3000);
System.out.println("sleep");
}
} What is the result?

正解:

Question No : 2
Given:
public class Threads4 {
public static void main (String[] args) {
new Threads4().go();
}
public void go() {
Runnable r = new Runnable() {
public void run() {
System.out.print("foo");
}
};
Thread t = new Thread(r);
t.start();
t.start();
}
} What is the result?

正解:

Question No : 3
Given:
import java.util.*;
public class Hancock {
// insert code here
list.add("foo");
}
}
Which two code fragments, inserted independently at line 5, will compile without warnings? (Choose two.)

正解:

Question No : 4
Given:
public class Person {
private String name;
public Person(String name) {
this.name = name;
}
public boolean equals(Object o) {
if ( ! ( o instanceof Person) ) return false;
Person p = (Person) o;
return p.name.equals(this.name);
}
} Which statement is true?

正解:

Question No : 5
Given:
HashMap props = new HashMap();
props.put("key45", "some value");
props.put("key12", "some other value");
props.put("key39", "yet another value");
Set s = props.keySet();
// insert code here What, inserted at line 39, will sort the keys in the props HashMap?

正解:

Question No : 6
DRAG DROP
Click the Task button.



正解:

Question No : 7
Given that the elements of a PriorityQueue are ordered according to natural ordering, and:
import java.util.*;
public class GetInLine {
public static void main(String[] args) {
PriorityQueue<String> pq = new PriorityQueue<String>();
pq.add("banana");
pq.add("pear");
pq.add("apple");
System.out.println(pq.poll() + " " + pq.peek());
}
} What is the result?

正解:

Question No : 8
DRAG DROP
Click the Task button.



正解:

Question No : 9
Given:
class A {
public void process() { System.out.print("A,"); }
class B extends A {
public void process() throws IOException {
super.process();
System.out.print("B,");
throw new IOException();
}
public static void main(String[] args) {
try { new B().process(); }
catch (IOException e) { System.out.println("Exception"); }
} What is the result?

正解:

Question No : 10
Click the Exhibit button.



Given the fully-qualified class names: com.foo.bar.Dog com.foo.bar.blatz.Book com.bar.Car com.bar.blatz.Sun
Which graph represents the correct directory structure for a JAR file from which those classes can be used by the compiler and JVM?

正解:

Question No : 11
Given:
interface Fish { }
class Perch implements Fish { }
class Walleye extends Perch { }
class Bluegill { }
public class Fisherman {
public static void main(String[] args) {
Fish f = new Walleye();
Walleye w = new Walleye();
Bluegill b = new Bluegill();
if(f instanceof Perch) System.out.print("f-p ");
if(w instanceof Fish) System.out.print("w-f ");
if(b instanceof Fish) System.out.print("b-f ");
}
} What is the result?

正解:

Question No : 12
Given:
interface DoStuff2 {
float getRange(int low, int high); }
interface DoMore {
float getAvg(int a, int b, int c); }
abstract class DoAbstract implements DoStuff2, DoMore { }
class DoStuff implements DoStuff2 {
public float getRange(int x, int y) { return 3.14f; } }
interface DoAll extends DoMore {
float getAvg(int a, int b, int c, int d); } What is the result?

正解:

Question No : 13
Given:
public class Commander {
public static void main(String[] args) {
String myProp = /* insert code here */
System.out.println(myProp);
}
} and the command line: java -Dprop.custom=gobstopper Commander
Which two, placed on line 13, will produce the output gobstopper? (Choose two.)

正解:

Question No : 14
Given:
class Employee {
String name; double baseSalary;
Employee(String name, double baseSalary) {
this.name = name;
this.baseSalary = baseSalary;
}
}
public class SalesPerson extends Employee {
double commission;
public SalesPerson(String name, double baseSalary, double commission) {
// insert code here
}
} Which two code fragments, inserted independently at line 13, will compile? (Choose two.)

正解:

Question No : 15
Given:
interface DeclareStuff {
public static final int EASY = 3;
void doStuff(int t); }
public class TestDeclare implements DeclareStuff {
public static void main(String [] args) {
int x = 5;
new TestDeclare().doStuff(++x);
}
void doStuff(int s) {
s += EASY + ++s;
System.out.println("s " + s);
}
} What is the result?

正解:

 / 18