Home Answers Viewqa Java-Beginners Java making a method deprecated

 
 


Java Coder
Java making a method deprecated
1 Answer(s)      5 months and a day 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 {@link new()} instead.  
 */
@Deprecated
public void old() {
// ...
}









Related Pages:
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 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
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 http://www.roseindia.net Thanks   
Pattern Making
Pattern Making  how to print this pattern in java? * * * * * * * * * * * * * * * * * It is just an example
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
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
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 java.net.*; import java.io.*; public class Browser extends JFrame implements
making help window
making help window   how to make help window in gui with java
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
Help in making a text formatter
Help in making a text formatter  I have a question on how to make a text formatter using Java. I attempted in doing so, but got a really low score on it, and so I'm having to rely on someone kind enough to help me. We use
making of dynamic textfields using swings
making of dynamic textfields using swings  How to make dynamic textfields using java swings
Making Tokens of a String
Making Tokens of a String      ... main method. Make an object of class StringTokenizer and pass one string inside... of StringTokenizer call the method countTokens() which gives the number of tokens
Making Tokens of a Java Source Code
Making Tokens of a Java Source Code       If you are new in Java programming then our tutorials and examples will be helpful in understanding Java programming in the most
Making a Frame Non Resizable in Java
Making a Frame Non Resizable in Java   ...() method has been used to make the frame resizable or not. If you pass the boolean value false to the setResizable() method then the frame will be non
Making a component drag gable in java
Making a Component Draggable in Java   ... draggable in java. This program provides the drag and drop feature from one... to another via clipboard. setTransferHandler(): This is the method
Making a Frame Non Resizable in Java
Making a Frame Non Resizable in Java   ... of the frame. The setResizable() method has been used to make the frame resizable or not. If you pass the boolean value false to the setResizable() method
Making Custom (User Defined) Exceptions
Making Custom (User Defined) Exceptions       <<<<<<< making_custom.shtml Making Custom (User Define Exceptions) So far you would have been known, how
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
Java: Method Exercises 2
Java: Method Exercises 2 Name: _________________________________ What... September // Remember: // * If a method is overloaded (more than one method.... // * Actual parameters (in the call) are evaluated before the method
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
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
Tips for Increasing Money Making Abilities of Your Articles
Tips for Increasing Money Making Abilities of Your Articles... your online business is an extremely cost effective and powerful method... the point which you are making. Write the article in such a manner
method inside the method??
method inside the method??  can't we declare a method inside a method in java?? for eg: public class One { public static void main(String[] args) { One obj=new One(); One.add(); private static void add
making a web application using Web-Logic Server - Struts
making a web application using Web-Logic Server  Hello , I am a beginner to the java platform so i am facing some problem in making a web aplication using a struts framework.Hence i referred the docs given in the link http
Method
of method in java object-oriented technique first one is the Instance method... by method's name and the parameter types. Java has a powerful feature which... Method      
Java Remote Method Invocation (RMI)
Java Remote Method Invocation (RMI)       The Java Remote Method Invocation API, is application... for this implementation is known as Java Remote Method Protocol (JRMP). A CORBA version
Method Overloading
Method Overloading  In java can method be overloaded in different class
Method Overloading
Method Overloading  In java can method be overloaded in different class
software making
software making   software hello sir sir i have learned this language, c and c++. when we doing coding in c and c++. that time we run those...++. please you give me guidness about making software. sir you tell me its
Remote Method Invocation (RMI)
only supports making calls from one JVM to another. Java Remote Method... Remote Method Invocation (RMI)       Java Remote Method Invocation (RMI) is a Java application
software making
software making    hello sir , sir you post me answer its difficult to make software in c and c++. but sir i want to make software in c and c++.sir i regueast you please you guid me. i hope you will help me make
making call
making call  Hi, Is it possible to make a call from application with out quitting application in iOS 4?   hello, this the code for call to a number NSString *phoneStr = [[NSString alloc] initWithFormat:@"tel
MAking combinitions
MAking combinitions  Dear All, Please help me.... I have some 60-70 lineswhich contains \new\code\R2.0.1\option.c \new\code\R2.0.3\option.c \new\code\R2.0.1\Test.c \new\code\R2.0.2\Test.c \new\code\R2.0.3\Test.c \new\code
Static method
Static method  what is a static method?   Have a look at the following link: Java Static Method
main method
main method  Why is the java main method static
pass method reference in java
pass method reference in java  How to pass method reference in Java
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
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 : http://www.roseindia.net/javamail/ 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
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
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://www.roseindia.net/help/java/t/java-try.shtml http
Method decleration in java
Method decleration in java  What is the catch or declare rule for method declarations
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

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.