question: public static String trimLine ( String line ) { int idx = line . indexOf ( "//" ) ; if ( idx != - 1 ) { line = line . substring ( 0 , idx ) ; } return line . trim ( ) ; }
target:  trims a line and removes comments