1Z0-501 無料問題集「Oracle Java Certified Programmer」
Exhibit:
1 . public class test {
2 .public static void add3 (Integer i) }
3 .int val = i.intValue ( );
4 .val += 3;
5 .i = new Integer (val);
6 .}
7 .
8 . public static void main (String args [ ] ){
9 .Integer i = new Integer (0);
1 0.add3 (i);
1 1.system.out.printIn (i.intValue ( ));
1 2.}
1 3.)
What is the result?
1 . public class test {
2 .public static void add3 (Integer i) }
3 .int val = i.intValue ( );
4 .val += 3;
5 .i = new Integer (val);
6 .}
7 .
8 . public static void main (String args [ ] ){
9 .Integer i = new Integer (0);
1 0.add3 (i);
1 1.system.out.printIn (i.intValue ( ));
1 2.}
1 3.)
What is the result?
正解:A
解答を投票する
Exhibit:
1 . import java.awt.*;
2 .
3 . public class X extends Frame {
4 . public static void main (String [] args) {
5 . X x = new X();
6 . x.pack();
7 . x.setVisible(true);
8 .}
9 .
1 0. public X(){
1 1. setLayout (new BordrLayout());
1 2. Panel p = new Panel ();
1 3. add(p, BorderLayout.NORTH);
1 4. Button b = new Button ("North");
1 5. p.add(b):
1 6. Button b = new Button ("South");
1 7. add(b1, BorderLayout.SOUTH):
1 8.}
1 9.}
Which two statements are true? (Choose Two)
1 . import java.awt.*;
2 .
3 . public class X extends Frame {
4 . public static void main (String [] args) {
5 . X x = new X();
6 . x.pack();
7 . x.setVisible(true);
8 .}
9 .
1 0. public X(){
1 1. setLayout (new BordrLayout());
1 2. Panel p = new Panel ();
1 3. add(p, BorderLayout.NORTH);
1 4. Button b = new Button ("North");
1 5. p.add(b):
1 6. Button b = new Button ("South");
1 7. add(b1, BorderLayout.SOUTH):
1 8.}
1 9.}
Which two statements are true? (Choose Two)
正解:C、E
解答を投票する