package com.tutego.insel.solutions.util;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class LottoShuffle
{
  public static void main( String args[] )
  {
    List<Integer> randomList = new ArrayList<Integer>();

    // Liste füllen
    for ( int i = 1; i <= 49; ++i )
      randomList.add( new Integer( i ) );

    // Liste mischen
    Collections.shuffle( randomList );

    // Subliste erzeugen
    List<Integer> lottoList = randomList.subList( 0, 7 );

    // Subliste sortieren
    Collections.sort( lottoList );

    // Subliste ausgeben
    System.out.println( lottoList );
  }
}
