1Z0-501 試験問題を無料オンラインアクセス
試験コード: | 1Z0-501 |
試験名称: | Java Certified Programmer |
認定資格: | Oracle |
無料問題数: | 147 |
更新日: | 2025-09-13 |
Given:
1. public class foo {
2 . static String s;
3 . public static void main (String[]args) {
4 . system.out.printIn ("s=" + s);
5 . }
6 . }
What is the result?
Given:
1 . class BaseClass{
2 . private float x= 1.0f;
3 . protected void setVar (float f) {x = f;}
4 . }
5 . class SubClass exyends BaseClass {
6 . private float x = 2.0f;
7 . //insert code here
8 .}
Which two are valid examples of method overriding? (Choose Two)
Given:
1 . public class Foo {
2 . public static void main (String []args) {
3 . int i = 1;
4 . int j = i++;
5 . if ((i>++j) && (i++ ==j)){
6 .i +=j;
7 .}
8 .}
9 .}
What is the final value of i?