原因:不建议import sun.* 的包。这些包不是官方正式的,在不同的平台上也许会不同;在不同的JAVA版本下,很可能会不通知就发生变化。
The sun.* packages are not part of the supported, public interface.
A Java program that directly calls into sun.* packages is not guaranteed to work on all Java-compatible platforms. In fact, such a program is not guaranteed to work even in future versions on the same platform.
For these reasons, there is no documentation available for the sun.* classes.
ref: http://java.sun.com/products/jdk/faq/faq-sun-packages.html
Why Developers Should Not Write Programs That Call 'sun' Packages
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9844649/viewspace-580174/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9844649/viewspace-580174/
博客指出Java中不建议import sun.*的包。这些包并非官方正式包,在不同平台可能存在差异,且在不同JAVA版本下可能会无通知变化,也没有相关文档,还给出了参考链接说明开发者不应调用此类包的原因。

1932

被折叠的 条评论
为什么被折叠?



