精華區beta java 關於我們 聯絡資訊
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. 1. Please explain the reasons behind such design. (Hint: You might need to use "Stacks" in your answer) 2. Without pointer arithmetic ability, can you still implement linked list in Java? 請問第一題應該怎麼回答比較好呢? 第二題我會回答有提供reference來實作linked list 不知道這樣可以嗎? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.166.114.24
TaiwanXDman:第2題 可以去抓Linked List的Source code 你就知道了 04/14 18:19
james732:第一題的題示我不懂,為什麼會跟Stack有關係....?? 04/14 21:57
mars90226:應該是指記憶體配置中的Stack 04/15 00:49
eieio:不支援的是 pointer arithmetic,不能 ++ -- 自己算地址 04/15 16:37
eieio:否則你算錯,改到其他的變數,結果會錯,還很難 debug 04/15 16:39