I am trying to calculates and returns where two DNA sequences of equal lengths differ. For example, given strings "ATGT" and "GTGA", the result should be array { true, false, false, true }. I am getting an error of False/true cannot be resolved to a variable heres what i got so far
/**
* Calculates and returns where two DNA sequences of equal lengths differ. For
* example, given strings "ATGT" and "GTGA", the result should be array
* { true, false, false, true }.
*
* @param dna1 a String representing a DNA sequence of arbitrary length (equal
* to dna2's length), containing only the characters A, C, G and T
* @param dna2 a String representing a DNA sequence of arbitrary length (equal
* to dna1's length), containing only the characters A, C, G and T
* @return an array of boolean values, of length equivalent to both
* parameters' lengths, containing true in each subscript where the
* parameter strings differ, and false where they do not differ
*/
public static boolean[] mutationPoints(String dna1, String dna2) {
boolean [] mutPoint = new boolean [dna1.length()];
for( int i = 0; i < i; i++) {
if( dna1 != dna2) {
mutPoint[i] = False;
}
else if (dna1 == dna2) {
mutPoint[i] = True;
}
}
true&false.for( int i = 0; i < i; i++) {This is always 0trueandfalse, but the next mystery will be the loop condition ` i < i`