作者kevintwo (MAI舞)
看板java
標題[問題] 查api 看到的code
時間Fri Jun 26 16:30:26 2009
在查 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)
推 adrianshum:你在哪裡看到的? 應該不可能過 06/26 16:35
推 PsMonkey:送去 javac 不就知道了.... ==.==== 06/26 16:48
推 sbrhsieh:是寫錯。 06/26 16:51
→ kevintwo:謝謝各位,應該先試一下的orz///// 06/26 16:58
推 yu00928:這一篇等一下鐵定被刪 都沒有人覺得版規太嚴嗎 06/26 20:32
→ yu00928:版主其實可以不要這麼辛苦 06/26 20:34
推 PsMonkey:就是說阿... 只是版主是不是在偷懶,怎麼還沒砍文章... 06/26 22:31
推 legnaleurc:樓上 .... orz 06/26 23:31