Oct 7, 2013

Shuffle 기능


 List< Integer > numbers;
Collections.shuffle( numbers );

// 0부터 6번째 인덱스 데이터 가지고 옴
        List< Integer > winningCombination = numbers.subList( 0 , 6 );

// 정렬
Collections.sort( winningCombination );

No comments:

Post a Comment