package com.tutego.insel.util;

import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;

public class UnsupportedOperationExceptionDemo
{
  public static void main( String[] args )
  {
    Collection<Integer> set = new HashSet<Integer>();
    Collection<Integer> set2 = Collections.unmodifiableCollection( set );
    set2.add( 1 ); // Exception in thread "main" java.lang.UnsupportedOperationException
  }
}
