作者boy5548 (小YO)
看板Grad-ProbAsk
標題[理工] 98清大
時間Wed Jan 19 13:37:45 2011
題目如下:
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
→ MiiQ:(b) 定義class 裡面包含 前後的資料+本身資料 01/19 16:36
→ MiiQ:包含前後的資料就是為了要做link 01/19 16:37
→ MiiQ:有錯請指教 01/19 16:46
推 hswayne:因為JAVA把pointer給hiden起來 以免破壞JRE與主機的防火牆 01/22 15:19
→ hswayne:( pointer可以指定call stack上的任意記憶體位址 ) 01/22 15:20