File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,13 +44,13 @@ public static void main(String[] args) {
4444 int max = sorted .last (); // 맨 뒤 키 값(가장 큰 수)
4545 System .out .println ("맨 앞 원소: " + min + ", 마지막 원소: " + max );
4646
47- int start = 3 ; // 시작 할 위치
48- int end = 8 ; // 끝 낼 위치
49- SortedSet <Integer > range = sorted .subSet (start , end ); // 3부터 8까지
47+ int start = 3 ; // 시작할 경계값(포함)
48+ int end = 8 ; // 끝 경계값(미포함)
49+ SortedSet <Integer > range = sorted .subSet (start , end ); // [3, 8) (3 이상 8 미만)
5050 System .out .println (start + " <= x < " + end + " : " + range );
5151
52- System .out .println ("처음부터 <= x < " + end + ": " + sorted .headSet (end )); // 처음부터 8까지
53- System .out .println (start + "<= x <= 마지막까지 " + sorted .tailSet (start )); // 3부터 마지막까지
52+ System .out .println ("처음부터 <= x < " + end + ": " + sorted .headSet (end )); // [min, 8) ( 처음부터 8 미포함)
53+ System .out .println (start + " ≤ x ≤ " + max + " : " + sorted .tailSet (start )); // 3부터 마지막까지
5454 }
5555
5656 int keySum = 0 ;
You can’t perform that action at this time.
0 commit comments