i have written code of custom deprecated annotation...if i run it in eclipse it didn't show compilation error and if program executed by cmd it gives deprecated error in it so my Question is that why eclipse do not show these?????`
package annotation;
public class customdeprecated
{
int basesalary=6000,ta=250,da=50;
int bonus=500,salary;
@Deprecated
void show_salary() //now it's deprecated method
{
salary=basesalary+ta+da;
System.out.println(salary);
}
void display()
{
salary=basesalary+ta+da+bonus;
System.out.println(salary);
}
public static void main(String[] args)
{
customdeprecated c=new customdeprecated();
c.show_salary(); //compile time error
c.display();
}
}