Re: [問題] 我的hello world 跑不出來
※ 引述《mar3 (小馬)》之銘言:
: ※ 引述《mar3 (小馬)》之銘言:
: : public class 001{
: : public static void main(String[ ] args){
: 想問大大上面這行
: 把 args 和 [ ] 互換位置變成 (String args[ ])
: 請問這兩行有什麼不同 (雖然說都可以跑沒問題)
: 爬文找不到(應該是很基礎的東西 所以沒人問吧^^")
: 抱歉看書自學 看到書上打的不一樣 也找不到答案
http://java.sun.com/docs/books/jls/third_edition/html/arrays.html#10.2
The [] may appear as part of the type at the beginning of the declaration,
or as part of the declarator for a particular variable, or both,
as in this example:
byte[] rowvector, colvector, matrix[];
This declaration is equivalent to:
byte rowvector[], colvector[], matrix[][];
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 125.225.160.241
→
06/11 23:03, , 1F
06/11 23:03, 1F
→
06/11 23:06, , 2F
06/11 23:06, 2F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 3 之 3 篇):