why cannot resolve symbol b in this section I want to check
why cannot resolve symbol b
in this section I want to check whether a DNA sequence contains char other than “atcg”.
Scanner: public class sequencer public int check valid (String dna) int a dna. length int i i do{ String s dna. substring (i, i+1) i++; boolean s. equal s (\"s\") Il s. equals (\'t lls. equals (\"c\")lls, equals (\"E\") hile true && i a): if(i a) return 1: lelse return 0; public string get Input (String dna, String dna2) String input Solution
Hi Friend, variable \'b\' is defined inside do{}while loop.
And you are using \'b\', outside the scope, as a condition in while().
You have to declare abd initialize \'b\' outside do{ }while() loop.
Like this:
boolean b ;
do{
// statements
b = \"S\".contains(\"e\");
}while(b);
Please let me know in case of any issue
