IUSR's Ughten of Silent Requiem

To whom it may resurrect
zh en ja

Live without CD-ROM/DVD-ROM

2005-04-16 咿咿呀呀

今天终于豁出去了,用VMware以直接读取物理硬盘的方式装了SuSE 9.3,没辙啊,光驱坏了好久了,又懒得找人去买,只能用这种方法了。上次Windows出了问题重装了一下,Grub理所当然地被覆盖掉了,到现在都有半年没进过Linux了……整天向往自由和开放,总感觉在Windows下这一切都很奇怪,呵呵,Windows的理念应该也和“自由”、“开放”相左吧。

继续阅读

避免在autoboxing过程中使用基本类型

2005-04-05 技术文章

以前就知道这个现象,不过没继续追究过。今儿打开Gmail ,有封Core Java Techologies Tech Tips,正好提到这事儿,摘录如下:

The primitives are equal and the values of the boxed ints are equal. But this time the ints point to different objects. What you have discovered is that for small integral values, the objects are cached in a pool much like Strings. When i and j are 2, a single object is referenced from two different locations. When i and j are 2000, two separate objects are referenced. Autoboxing is guaranteed to return the same object for integral values in the range [-128, 127], but an implementation may, at its discretion, cache values outside of that range. It would be bad style to rely on this caching in your code.相关链接:http://java.sun.com/j2se/1.5.0/docs/guide/language/autoboxing.html

继续阅读
较旧的帖子 较新的帖子