对于下面的东西不是很理解.比如
final OpenRecordExisted open = new OpenRecordExisted();
open.getOpenButton().addActionListener(
new ActionListener()
{
public void actionPerformed(ActionEvent event)
{
if (open.isExisted())
{
setCertainComponentsVisible();
showHomePage();
currentBook = open.getCurrentBook();
}
}
}); 为什么要final呢. 也只有这样, 在响应消息的时候才可以调用open的方法, isExist, 这是为什么?
final OpenRecordExisted open = new OpenRecordExisted();
open.getOpenButton().addActionListener(
new ActionListener()
{
public void actionPerformed(ActionEvent event)
{
if (open.isExisted())
{
setCertainComponentsVisible();
showHomePage();
currentBook = open.getCurrentBook();
}
}
}); 为什么要final呢. 也只有这样, 在响应消息的时候才可以调用open的方法, isExist, 这是为什么?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货