Friday, July 6, 2012

SuppressWarnings in Java

Today I had to spent some time on writing SuppressWarnings syntax for multiple values. So thought of posting it ...


It can be written in following ways :
  1. @SuppressWarnings("deprecation")
  2. @SuppressWarnings({ "unchecked", "unused" })
  3. @SuppressWarnings(value = {"unchecked", "unused"})