Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  

Java making a method deprecated



Share on Google+Share on Google+

Java Coder
Java making a method deprecated
1 Answer(s)      4 years and 7 months ago
Posted in : Java Beginners

java making a method deprecated

In Java how to declare a method depricated? Is it correct to use

depricated method in my application? But at the same time i want

to show a "warning" message to anyone who is using that method.

Please tell me how to achieve that?

View Answers

December 18, 2012 at 12:23 PM

Declare "@Deprecated" before a method to create a method deprecated in your Java application. Though, it is not a correct

way to use a deprecated class or method in Java. Instead of it

you can use alternatives that exists.

Syntax of declaring a method deprecated.

 * Does some thing in old style.
 * @deprecated use [email protected] new()} instead.  
public void old() {
// ...


Related Tutorials/Questions & Answers:
Java making a method deprecated
Java making a method deprecated  java making a method deprecated In Java how to declare a method depricated? Is it correct to use depricated...; Declare "@Deprecated" before a method to create a method deprecated in your
What is deprecated?
declaration.   Related Answer: Java making a method deprecated...What is deprecated?  What is mean by deprecated element, method... or element, which is either changed or not approved. In Java if any method or class
making trees - Java Beginners
making trees   pls i do't know what this yerms mean in terms of java trees and stacks? Inorder traverse Switch statement Doing something to the stack thanks in advance
Browser making by java coding
Browser making by java coding  import javax.swing.*; import javax.swing.event.*; import java.awt.*; import java.awt.event.*; import*; import*; public class Browser extends JFrame implements
making use java image filters
making use java image filters  while making use any functions built in jerry's filter in java application i get a NullPointerException.. I dont know the reason for this.. please give me a solution
Making efficient program - Java Beginners
Making efficient program  Hi, How you can write efficient programs in Java? Thanks
java method
java method  can we declare a method in java like this static { System.loadLibrary("nativelib"); } i have seen this in a java learning E book. i don't understand the static { } plz help me. what kind of method
Decision-making Statements in java 7
Decision-making Statements in java 7 In this section, we will discuss about Decision-making Statements in java 7. This is one type of control flow statement. Decision-making Statements : This kind of control statements is used where
MPMoviePlayerContentPreloadDidFinishNotification' is deprecated
MPMoviePlayerContentPreloadDidFinishNotification' is deprecated  Hi, While compiling compiler is giving following error: warning: 'MPMoviePlayerContentPreloadDidFinishNotification' is deprecated (declared at /Developer
UIKeyboardBoundsUserInfoKey is deprecated
UIKeyboardBoundsUserInfoKey is deprecated  On running my application i am getting a warning as given below... " UIKeyboardBoundsUserInfoKey is deprecated " What is the cause of it?? and what should i use instead
UILineBreakModeWordWrap is deprecated
UILineBreakModeWordWrap is deprecated  I am getting the error UILineBreakModeWordWrap is deprecated in IOS 6.0. What is the latest code to be used for this? Thanks   Hi, If you use the following code
Exceptional Example in Java
Exceptional Example in Java       When an error occurs in a method, Java creates an object of the Exception method. On making an object of exception method, java send
pass method reference in java
pass method reference in java  How to pass method reference in Java
Making Exceptions Unchecked - java tutorial,java tutorials
and Unchecked Exceptions in java and how to handle it. The Exception is a condition which indicates error in your code. Types of built-in exception in Java Given below types of built-in exception in java : 1. Unchecked Exception 2. Checked
java method - Java Beginners
java method  Plz help me on toString() in java  Hi Friend, The Object class provides the method toString() that returns the string..., the toString() method of the object is automatically called. Thanks
class method in java
class method in java  How to write a class method in Java?   You must read Java - Class, Object and Methods in Java
Using throw in java method
Using throw in java method  using throw with method implies what
HTTP_POST_VARS is deprecated
HTTP_POST_VARS is deprecated  HTTPPOSTVARS is deprecated. Which function to be used? Thanks   Hi, You should use: $id=$_GET["id"]; or $id=$_POST["id"]; thanks
java method - Java Beginners
java method  i wanna explation about a method for example... Mail[] getAllMails(String userName) I WANNA EXPLATION ABOUT ABOVE METHOD CAN U... and Tutorials on Java Mail visit to : Thanks
try catch method in java
try catch method in java  try catch method in java - when and how should i use the try and catch method in Java ?   Please visit the following links: http
software making
software making   hello sir you asked me language... in developing application in it. You should consider Java to develop your software. You can learn java at Thanks   
Function split() is deprecated
Function split() is deprecated  Hi, The Function split() is deprecated in latest version of PHP 5.5.23? What is the solution? Thanks   Hi, Use the following function: array explode ( string $delimiter , string
Generic Method - Java Beginners
Generic Method  I want simple java program for Generic Method with explanation
getch() method in java
getch() method in java  does someone know how can i obtain the getch() function in java
Static Method in Java
Static Method in Java  Is Overriding Static methods possible in java? If Yes, How
Class and method question, Java?
Class and method question, Java?  Consider a Java class that you... Prompt string** and the following method: getValue displays the prompt and reads..., the method should display an error message and ask the user for a new value
Annotationconfiguration deprecated and its replacement
Annotationconfiguration deprecated and its replacement  Hi, In Hibernate 4 annotationconfiguration is deprecated. Can you tell me what will be its replacement? Thanks   Hi, You can use the following code in your
Is main method compulsory in Java?
Is main method compulsory in Java?  Hi, Can we have a executable class in Java without a main method? I am going to write simple Java program and there is main method. Is main method compulsory in Java? Thanks   Hi
Is buildSessionFactory() deprecated in hibernate 4?
Is buildSessionFactory() deprecated in hibernate 4?  Hi, I am trying to develop an application in Hibernate 4. I am using the Hibernate build. Following code is given is the Hibernate documentation: SessionFactory
Version of cocoon>cocoon-deprecated dependency
List of Version of cocoon>cocoon-deprecated dependency
java method - Java Beginners
java method  hi friends, Is there any default return type for methods in java?  There is no default return type in java, as a user you have to specify the return type even void