Ad
  • Custom User Avatar

    You are using == to compare the Strings, but by doing so you are comparing the memory address and not the String values. To fix this you can compare using the equals method or simply do dna.charAt(i) == 'T' (with single quotes), for example, and your code will work.