How to deprecate a method?
Show it with proper example.
Plz give the answer of this.Thanx in advance.
mail me: tanzeem.akhtar@gmail.com

Answers were Sorted based on User's Feedback



How to deprecate a method? Show it with proper example. Plz give the answer of this.Thanx in advan..

Answer / ravikiran

we cann't depricate a method.
Sun while introduces a new verion of release if similar
functionality method is about to introduce with less error
prone then they will depricatethe previous version's method

Is This Answer Correct ?    3 Yes 1 No

How to deprecate a method? Show it with proper example. Plz give the answer of this.Thanx in advan..

Answer / aslam

/**
* @deprecated
*
*/
public void depricatedMethod(){

}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Write java code to print "Hello how are you" Thread1 should have "Hello" Thread2 should have "how are you" both the threads should start at the same time

4 Answers   Huawei,


What is files manifesting?

0 Answers  


If goto and const is reserve words than why it is not work in java?

0 Answers  


How applets will communicate with each other?

1 Answers  


What is ternary operator in java?

0 Answers  






What is string in java? String is a data type?

0 Answers  


What is an object in java?

0 Answers  


What are assembly attributes?

0 Answers  


7) Suppose there is Student class like class student { int age; string name; } We want to store these objects in a HashMap. Do we need to override any methods in Student class? If any which ones and why? what if i just override equals or just hashcode? what will be the results in both the cases?

4 Answers   CSC, Nagarro, RBS,


Can we execute a program without main?

0 Answers  


what are the high-level thread states? : Java thread

0 Answers  


why use interface? if interface declear a method implement in class. why direct implement method in class

1 Answers   HCL,


Categories