question: public int dnsDomainLevels ( String host ) { int count = 0 ; int startPos = 0 ; while ( ( startPos = host . indexOf ( "." , startPos + 1 ) ) > - 1 ) { count ++ ; } return count ; }
target:  Returns the number of DNS domain levels (number of dots) in the host name.