[理工] [資結]-98清大資工所

看板Grad-ProbAsk作者 (小YO)時間15年前 (2011/01/19 13:37), 編輯推噓1(104)
留言5則, 2人參與, 最新討論串1/1
題目如下: Java is a programming language derived much of its syntax from C and C++. Different from C and C++, Java does not support pointer arithmetic. a) (7%) Please explain the reasons behind such design. (Hint: You might need to use "Stacks" in your answer.) b) (3%) Without pointer arithmetic ability, can you still implement linked lists in Java? 請問有人會這一題嗎? 謝謝~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 163.22.18.42

01/19 16:36, , 1F
(b) 定義class 裡面包含 前後的資料+本身資料
01/19 16:36, 1F

01/19 16:37, , 2F
包含前後的資料就是為了要做link
01/19 16:37, 2F

01/19 16:46, , 3F
有錯請指教
01/19 16:46, 3F

01/22 15:19, , 4F
因為JAVA把pointer給hiden起來 以免破壞JRE與主機的防火牆
01/22 15:19, 4F

01/22 15:20, , 5F
( pointer可以指定call stack上的任意記憶體位址 )
01/22 15:20, 5F
文章代碼(AID): #1DDdYjis (Grad-ProbAsk)