Why i get HelloWorld.java uses or overrides a deprecated API, when compiling java using cmd? -


when compiling java file helloworld.java using command prompt, why following errors:

note: helloworld.java uses or overrides deprecated api. note: recompile -xlint:deprecation details.

this hint, using function condiered "deprecated", i.e. may vanish in later versions of java (see http://docs.oracle.com/javase/6/docs/api/java/lang/deprecated.html official definition).

the concept of deprecating apis works this: in version, lets say, 1.0 api gets added. in later version (e.g. version 3.0) better apis introduced, , old api marked deprecated in order warn people using old api - in version people warning, old api not yet removed backward compatibility. later version lets 5.0 deprecated api may removed.

check out java documentation (see links below) getting more information this. there written, new methods use instead.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -