public static Boolean cmprStr( String s1, String s2 )
{
// STUFF
}
I want to iterate through s1 to make sure that every character in s1 is incl
// Here's some code I wrote to find CG ratio in a gene
public double findCgRatio(String gene)
{
double cCount =0.0;
double gCount =0.0;
gene = gene.toLowerCase();
for(char character : gene.toCharArray())
{
if(character == 'c')
{
cCount++;
}
else if(character == 'g')
{
gCount++;
}
}
System.out.println("CG Ratio was :" + (cCount/gCount) );
return cCount/gCount; // cgRatio
}