1Z0-851 試験問題を無料オンラインアクセス
試験コード: | 1Z0-851 |
試験名称: | Java Standard Edition 6 Programmer Certified Professional Exam |
認定資格: | Oracle |
無料問題数: | 290 |
更新日: | 2025-09-21 |
Given:
3.public class Batman {
4.int squares = 81;
5.public static void main(String[] args) {
6.new Batman().go();
7.}
8.void go() {
9.incr(++squares);
10.System.out.println(squares);
11.}
12.void incr(int squares) { squares += 10; }
13.}
What is the result?
Given:
1.d is a valid, non-null Date object
2.df is a valid, non-null DateFormat object set to the current locale What outputs the current locale's country name and the appropriate version of d's date?
Given:
11.public class Rainbow {
12.public enum MyColor {
13.RED(0xff0000), GREEN(0x00ff00), BLUE(0x0000ff);
14.private final int rgb;
15.MyColor(int rgb) { this.rgb = rgb; }
16.public int getRGB() { return rgb; }
17.};
18.public static void main(String[] args) {
19.// insert code here
20.}
21.}
Which code fragment, inserted at line 19, allows the Rainbow class to compile?
Given:
11.public interface A111 {
12.String s = "yo";
13.public void method1();
14.}
17. interface B { }
20.interface C extends A111, B {
21.public void method1();
22.public void method1(int x);
23.}
What is the result?