logo

Crowdly

Mida tagastab antud funktsioon? public String loopAlphabet() { String...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Mida tagastab antud funktsioon?

public String loopAlphabet() {

String alphabet = "abcdefghijklmnopqrstuvwxyz";

// 'a' ascii code is 97

String answ = "";

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

int letter = (int) alphabet.charAt(i);

if (letter % 2 != 0) answ += (char) letter;

}

return answ;

}

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.taltech.ee?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!