Question: describe this java code in one sentence about what it does. } public String mystery (String dna) { int pos = dna.indexOf(T); int count =
describe this java code in one sentence about what it does.

} public String mystery (String dna) { int pos = dna.indexOf("T"); int count = 0; int startPos = 0; String newDna = if (pos == -1) { return dna; } } while (count < 3) { count += 1; newDna = newDna + dna.substring(startPos, pos); startPos = pos+1; pos = dna.indexOf("T", startPos); if (pos == -1) { break; } } newDna = newDna + dna.substring(startPos); return newDna;
Step by Step Solution
There are 3 Steps involved in it
Method Overview The mystery method takes a string parameter named dna and returns a new string that ... View full answer
Get step-by-step solutions from verified subject matter experts
