I want to convert Tue Jun 01 00:00:00 IST 112 into 01-JUN-2012
I used
 Calendar calendar = new GregorianCalendar(year, 6,          
        Use capital MMM in date format as shown below -
  SimpleDateFormat s=new SimpleDateFormat("dd-MMM-yyyy");
Everything else is ok
    Calendar calendar = Calendar.getInstance();
     Date maxDate=new Date();
     maxDate=calendar.getTime();  
     calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMinimum(Calendar.DAY_OF_MONTH)); 
     SimpleDateFormat s=new SimpleDateFormat("dd-MMM-yyyy");
     System.out.println(s.format(maxDate));
output would be - 06-Jul-2012
Use CAPITAL M for month,
 SimpleDateFormat s=new SimpleDateFormat("dd-MMM-yyyy");
Also you are setting date first and then you are resetting calendar which I guess not what you want to do so may be you need to change it to as follows
Date maxDate=new Date();
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMinimum(Calendar.DAY_OF_MONTH)); 
maxDate=calendar.getTime();  
SimpleDateFormat s=new SimpleDateFormat("dd-MMM-yyyy");
s.format(maxDate);
See