The IT Certification Resource Center

Featured Deal

Get CompTIA, Cisco, or Microsoft training courses free for a week.
Learn More ❯
Promotions

Oracle Java Quiz 1

This free quiz contains 15 Java programming questions (with answer explanations) to help you test your Java skills and prepare for the Oracle Certified Associate Java SE 8 Programmer 1 exam (1Z0-808).

 

 

 

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