Skip to content

Commit 46919a7

Browse files
committed
Fixed comparison operator; thank you reader
;
1 parent ba8b804 commit 46919a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CCSPiJ/src/chapter2/Gene.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public int compareTo(Codon other) {
4949
private ArrayList<Codon> codons = new ArrayList<>();
5050

5151
public Gene(String geneStr) {
52-
for (int i = 0; i < geneStr.length() - 3; i += 3) {
52+
for (int i = 0; i <= geneStr.length() - 3; i += 3) {
5353
// Take every 3 characters in the String and form a Codon
5454
codons.add(new Codon(geneStr.substring(i, i + 3)));
5555
}

0 commit comments

Comments
 (0)