In fact, any developer that has ever had to return to a program, knows that each time the program is rewritten it gets a little better but never is perfect. The same thing goes for languages. When the Java team at Sun released the first version of Java, they knew that the language would have to evolve. As soon as Java was released, people began to build programs using Java. The answer was deprecation.
Deprecation is what happens to functions when they are retire.
When a function is deprecated, it means that the method was once valid, but has now been replaced by a newer method. Deprecated methods all produce warnings that let the developer know that she is advised to use the newer method. Deprecation allows an industry to gradually move off bits of a language that are intended to be phased out but which cannot be phased out immediately because too many programs depend on stability. So what you are seeing is not exactly an error. It is just a warning.