Java cannot allow pointers, because doing so would allow Java applets to breach the firewall between the java execution environment and the host computer.
A pointer can be given any addres in memory, even addresses that might be outside the Java run-time system.
Java designed in such a way that as long as you stay within the confines of the execution enviroment , you will never need to use a pointer, nor would there be any benefit in using one.
本文探讨了Java设计中为何不支持指针的原因。指针的使用可能使Java Applet突破执行环境与宿主计算机之间的防火墙,带来安全隐患。文章解释了在Java运行环境中,只要在规定范围内操作,则无需使用指针,且使用指针并无益处。
3456

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



