Java tutorial
//package com.java2s; import java.io.Serializable; import java.util.Collection; import java.util.RandomAccess; public class Main { @SuppressWarnings("rawtypes") public static void printInterfaceChecks(Collection c) { System.out.println(c.getClass().getName() + " Implememnts RandomAccess? " + (c instanceof RandomAccess)); System.out.println(c.getClass().getName() + " Implememnts Serializable? " + (c instanceof Serializable)); System.out.println(c.getClass().getName() + " Implememnts cloneable? " + (c instanceof Cloneable)); } }