[問題] 面試時被問到介面功能
今天面試時被面試官問Java為什麼要有介面
有繼承的機制不就夠了嗎?
我的回答是因為為了要解決Java不能多重繼承的問題
避免為了繼承而繼承破壞繼承的結構
也讓不同的類別可以分離出共同的介面
面試官接著問:還有呢?
這…我的功力不夠就答不出來了
所以想請教一下各位
除了上面的答案之外還有什麼更完善的答案呢?
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.192.28.81
→
10/15 14:49, , 1F
10/15 14:49, 1F
→
10/15 15:20, , 2F
10/15 15:20, 2F
→
10/15 15:25, , 3F
10/15 15:25, 3F
→
10/15 15:56, , 4F
10/15 15:56, 4F
→
10/15 16:04, , 5F
10/15 16:04, 5F
推
10/15 16:15, , 6F
10/15 16:15, 6F
→
10/15 16:16, , 7F
10/15 16:16, 7F
推
10/15 16:18, , 8F
10/15 16:18, 8F
→
10/15 16:19, , 9F
10/15 16:19, 9F
→
10/15 16:20, , 10F
10/15 16:20, 10F
→
10/15 16:22, , 11F
10/15 16:22, 11F
→
10/15 16:22, , 12F
10/15 16:22, 12F
推
10/15 16:23, , 13F
10/15 16:23, 13F
→
10/15 16:23, , 14F
10/15 16:23, 14F
→
10/15 16:25, , 15F
10/15 16:25, 15F
推
10/15 16:26, , 16F
10/15 16:26, 16F
推
10/16 08:55, , 17F
10/16 08:55, 17F
推
10/16 09:47, , 18F
10/16 09:47, 18F
→
10/16 12:17, , 19F
10/16 12:17, 19F
→
10/16 12:19, , 20F
10/16 12:19, 20F
→
10/16 12:21, , 21F
10/16 12:21, 21F
→
10/16 14:46, , 22F
10/16 14:46, 22F
→
10/16 15:25, , 23F
10/16 15:25, 23F
→
10/16 16:04, , 24F
10/16 16:04, 24F
→
10/16 16:06, , 25F
10/16 16:06, 25F
→
10/16 16:10, , 26F
10/16 16:10, 26F
→
10/16 16:12, , 27F
10/16 16:12, 27F
→
10/16 16:23, , 28F
10/16 16:23, 28F
→
10/16 20:42, , 29F
10/16 20:42, 29F
→
10/17 13:18, , 30F
10/17 13:18, 30F
→
10/17 18:34, , 31F
10/17 18:34, 31F
→
10/17 18:35, , 32F
10/17 18:35, 32F
→
10/18 01:17, , 33F
10/18 01:17, 33F
→
10/18 01:26, , 34F
10/18 01:26, 34F
→
10/18 01:30, , 35F
10/18 01:30, 35F
→
10/18 01:37, , 36F
10/18 01:37, 36F
討論串 (同標題文章)
java 近期熱門文章
PTT數位生活區 即時熱門文章