Solved

Given That S Is a String, What Does the Following

Question 27

Multiple Choice

Given that s is a String, what does the following loop do? for(int j = s.length() ; j > 0; j--)
System.out.print;


A) It prints s out backwards
B) It prints s out forwards
C) It prints s out backwards after skipping the last character
D) It prints s out backwards but does not print the first character
E) It yields a run-time error because there is no character at s.charAt(j-1) for j = 0

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions