結果 : java take first n elements of string