Deprecated in Java 1.6

In Java 1.5, to discard a method, you will:

@Deprecated int foo(int bar) {
}

Compiling in Java 1.6 results in the following results:

Any ideas?

Solution

You must tell the compiler to use 1.6:

javac -source 1.6

Or equivalent ide / build system (as recommended by others)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>