We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba8b804 commit 46919a7Copy full SHA for 46919a7
CCSPiJ/src/chapter2/Gene.java
@@ -49,7 +49,7 @@ public int compareTo(Codon other) {
49
private ArrayList<Codon> codons = new ArrayList<>();
50
51
public Gene(String geneStr) {
52
- for (int i = 0; i < geneStr.length() - 3; i += 3) {
+ for (int i = 0; i <= geneStr.length() - 3; i += 3) {
53
// Take every 3 characters in the String and form a Codon
54
codons.add(new Codon(geneStr.substring(i, i + 3)));
55
}
0 commit comments