Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Java making a method deprecated
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Java Coder
Java making a method deprecated
1 Answer(s)      a year and 10 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?


Advertisement
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 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
Advertisements
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 java.net.*; import java.io.*; 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
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
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
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
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
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
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 4.3.0.final build. Following code is given is the Hibernate documentation: SessionFactory
The type ServiceRegistryBuilder is deprecated
is deprecated What is the correct way of creating the SessionFactory in Hibernate
Function mysql_db_query() is deprecated
Function mysql_db_query() is deprecated  Hi, In latest version of PHP Function mysqldbquery() is deprecated. What could be the solution? Thanks
Function mysql_db_query() is deprecated
Function mysql_db_query() is deprecated  Hi, In latest version of PHP Function mysqldbquery() is deprecated. What could be the solution? 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
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
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
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   
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
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
DECESION MAKING STATEMENTS
DECESION MAKING STATEMENTS  The Decision Making statements may be implemented in different forms depending on the complexity of the condition to be tested. Describe various forms of decision making statements in java
pass method reference in java
pass method reference in java  How to pass method reference in Java
Pattern Making
Pattern Making  how to print this pattern in java? * * * * * * * * * * * * * * * * * It is just an example
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
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
Using throw in java method
Using throw in java method  using throw with method implies what
 

 

 

DMCA.com