question: private static int countGapsDashDotStar ( String sequence ) { int count = 0 ; for ( int i = 0 ; i < sequence . length ( ) ; i ++ ) { int a = sequence . charAt ( i ) ; if ( a == '-' || a == '.' || a == '*' ) count ++ ; } return count ; }
target:  count the number of gaps ('-', '.', '*') in a sequence