The IT Certification Resource Center

Featured Deal

CompTIA certification training - free for a week.
Learn More ❯

Oracle Java Quiz 1

This practice test contains 15 java questions with answer explanations to help you test your Java skills and  prepare for the Oracle Certified Associate - Java Programmer exam.

Question 1:

Given

1.    int []a = {1,2,3,4,5,6};
2.    int i = a.length - 1;
3.    
4.    while(i>=0){
5.      System.out.print(a[i]);
6.      i--;
7.    } 

What is the result?

 

A. 123456
B. An exception could be thrown at runtime.
C. 654321
D. nothing
E. 65432
F. 12345