Which option can replace xxx to enable the code to print 135?

Given the code fragment:

Which option can replace xxx to enable the code to print 135?
A. int e = 0; e < = 4; e++
B. int e = 0; e < 5; e + = 2
C. int e = 1; e < = 5; e + = 1
D. int e = 1; e < 5; e+ =2

Download Printable PDF. VALID exam to help you PASS.

2 thoughts on “Which option can replace xxx to enable the code to print 135?

  1. B
    public static void main(String[] args) {
    int a[] = {1,2,3,4,5};
    for(int e = 0;e<5;e+=2){
    System.out.print(a[e]);
    }
    }

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.