Archive for August, 2004

These days, when I’m reading some other guy’s code, I encounter some problem. In these code, I can read following codes:
JButton button = new JButton("OK");
button.setActionCommand("OK");
button.addActionListener(this);
……
actionPerformed(e) {
    String s = e.getActionCommand();
    if(s=="OK")
    ……
}
Look, it use “==” but not “equals” here. “Oh, it must be a bug!”, I told myself. But, wait, when I excuted the […]

Popularity: 23%


Creative Commons License
This work is licensed under a Creative Commons License.

你在我的心里永远是故乡