[問題] 查api 看到的code
在查 java.awt.Component時,看到下面的code
import java.awt.*;
import java.awt.event.*;
import java.io.Serializable;
class MyApp java.io.Serializable //想問的問題在這
{
BigObjectThatShouldNotBeSerializedWithAButton bigOne;
Button aButton = new Button();
static class MyActionListener implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
System.out.println("Hello There");
}
}
MyApp()
{
aButton.addActionListener(new MyActionListener());
}
}
class MyApp java.io.Serializable 這裡是少寫了 "implements" 嗎?
還是這是不用 implements這個key word的寫法?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.95.110
※ 編輯: kevintwo 來自: 140.113.95.110 (06/26 16:31)
推
06/26 16:35, , 1F
06/26 16:35, 1F
推
06/26 16:48, , 2F
06/26 16:48, 2F
推
06/26 16:49, , 3F
06/26 16:49, 3F
推
06/26 16:51, , 4F
06/26 16:51, 4F
→
06/26 16:58, , 5F
06/26 16:58, 5F
推
06/26 20:32, , 6F
06/26 20:32, 6F
→
06/26 20:34, , 7F
06/26 20:34, 7F
推
06/26 22:31, , 8F
06/26 22:31, 8F
推
06/26 23:31, , 9F
06/26 23:31, 9F