最新的 Other Oracle Certification 1Z0-501 免費考試真題:
1. Given:
1 . switch (i){
2 . default:
3 . System.out.printIn("Hello");
4 . )
What are the two acceptable types for the variable i? (Choose Two)
A) Char
B) Double
C) Float
D) Byte
E) Object
2. Given:
1 . public class SyncTest (
2 . private int x;
3 . private int y;
4 . private synchronized void setX (int i) (x=1;)
5 . private synchronized void setY (int i) (y=1;)
6 . public void setXY(int 1)(set X(i); setY(i);)
7 . public synchronized Boolean check() (return x !=y;)
8 . )
Under which conditions will check () return true when called from a different class?
A) Check() can never return true.
B) Check() can return true when setXY is called by multiple threads.
C) Check() can only return true if SyncTest is changed to allow x and y to be set separately.
D) Check() can return true when multiple threads call setX and setY separately.
3. Given:
1 . public class IfTest (
2 . public static void main(string[]args) {
3 . int x = 3;
4 . int y = 1;
5 . if (x = y)
6 . system.out.printIn("Not equal");
7 . else
8 . system.out.printIn("Equal");
9 .}
1 0. )
What is the result?
A) An error at line 5 causes compilation to fall.
B) The program executes but does not print a message.
C) The output in "Not Equal"
D) The output is "Equal"
4. Given:
1 . public class X {
2 . public object m () {
3 . object o = new float (3.14F);
4 . object [] oa = new object [1];
5 . oa[0]= o;
6 . o = null;
7 . oa[0] = null;
9 . return o;
9 . }
1 0.}
When is the float object created in line 3, eligible for garbage collection?
A) Just after line 8(that is, as the method returns).
B) Just after line 7.
C) Just after line 6.
D) Just after line 5.
5. Exhibit:
1 . public class test(
2 . public int aMethod()[
3 . static int i=0;
4 . i++;
5 . return I;
6 . )
7 . public static void main (String args[]){
8 . test test = new test();
9 . test.aMethod();
1 0.int j = test.aMethod();
1 1.System.out.printIn(j);
1 2.]
1 3.}
What is the result?
A) Compilation will succeed and the program will print "2"
B) Compilation will succeed and the program will print "1"
C) Compilation will fail.
D) Compilation will succeed and the program will print "0"
問題與答案:
| 問題 #1 答案: A,D | 問題 #2 答案: B | 問題 #3 答案: A | 問題 #4 答案: B | 問題 #5 答案: A |

下載最新試用版
1165位客戶反饋
我們對我們的產品非常有信心,所以我們不提供会给客户带去麻煩的產品。








1.160.169.* -
上週通過了 1Z0-501 考試,我使用的 VCESoft 學習資料幫助了我很多。我只花了30個小時學習它,這樣為我省下了大量的時間,非常感謝有你們的幫助!