### Test: Computer Science

Consider the code below:

String s = "Logic!";

String s2 = "";

for(int i = 0; i < s.length(); i++) {

     if(i != 0) {

          s2 += " ";

     }

     s2 += s;

}

 1 What is the value of s2 at the end of the code's execution?

Logic! Logic! Logic! Logic! Logic! Logic!

Logic! Logic! Logic! Logic! Logic! Logic!

L L L L L L o o o o o o g g g g g g i i i i i i c c c c c c ! ! ! ! ! !

Logic! Logic! Logic!

LoGiC! LoGiC! LoGiC! LoGiC! LoGiC! LoGiC!

1/3 questions

0%

## Access results and powerful study features!

Take 15 seconds to create an account.