Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
I am using eclipse to develop a web application. Just today I have updated my struts version by changing the JAR file. I am getting warnings at some places that methods are deprecated, but the code is working fine. I want to know some things Is it wrong to use Deprecated methods or classes in Java? What if I don't change any method and run my application with warnings that I have, will it cr...
I was studying the legacy API's in the Java's Collection Framework and I learnt that classes such as Vector and HashTable have been superseded by ArrayList and HashMap. However still they are NOT deprecated, and deemed as legacy when essentially, deprecation is applied to software features that are superseded and should be avoided, so, I am not sure when is a API deemed legacy and when it is d...
Do any problems arise because of using deprecated functions in Java?? If so, why do they keep this function?? Is it a bad habit if you use a deprecated method in Java like java.sql.Date.getMonth or getYear or getDate???
I am working on a project in which, to resolve a versioning issue, I am creating many classes which will never be tested and must not ever be used - they just need to be there to keep the compiler happy. I'd like to make sure they are never used. This morning I had the idea of throwing an exception in a static initialization block: public class Dummy { static { throw new Illegal...
There has to be a name for this. I'm thinking degraded or unused (old isn't descriptive enough). Has anyone come up with something descriptive to call this?
I have to exclude a few of the public methods of a class from being included in javadocs. I tried Chris Nokleberg's ExcludeDoclet (sixlegs). But the doclet is giving a slight problem : If the other methods in the class return List (or any other generics), instead of being displayed in the javadoc as List, return type is just being displayed as List (without the generic info) Can anyone give ...
I have some third part library Foo with class FooBar. I think that class FooBar is bad designed. I want write my own MyBar as adapter pattern. Can I mark original FooBar as @Deprecated without code modifications?
I'm reading a book which says not to use such a code: private volatile Thread myThread; .... myThread.stop(); Instead one should use: if (myThread != null ) { Thread dummy = myThread; myThread = null; dummy.interrupt(); } Unfortunately the subject is not elaborated any further... Could someone explain me this?
I imported the xerxesImpl.jar into my android project, seems to recognise it when I use it i.e. lists all available methods, but the names are crossed out.. Does anyone know why this is?
 /*
  * Copyright 2003-2004 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Sun designates this
  * particular file as subject to the "Classpath" exception as provided
  * by Sun in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
 * CA 95054 USA or visit www.sun.com if you need additional information or
 * have any questions.
 */
package java.lang;
A program element annotated @Deprecated is one that programmers are discouraged from using, typically because it is dangerous, or because a better alternative exists. Compilers warn when a deprecated program element is used or overridden in non-deprecated code.

Author(s):
Neal Gafter
Since:
1.5
public @interface Deprecated {
New to GrepCode? Check out our FAQ X