作者shenevol (dodoro)
看板java
標題[問題] 嚜穆ublic class Test?
時間Sun Apr 12 00:16:04 2009
嗚 我想請問一個百思不得其解的鳥問題
我最近在電腦上compile java都會顯示下面這個錯誤
class, interface, or enum expected
"嚜穆ublic class Test {"
^
可是我明明在Test 裡面的code都是乖乖打阿
長這樣
public class Test
{ public static void main(String []args){
..........
}
}
實在不知道究竟怎麼回事
明明打的一樣 這樣的問題有時候會出現有時候不會出現= =
估狗了一下還是沒啥結果
我都是用記事本直接打然後cmd javac Test.java這樣
這樣compile跟我設定記事本裡面的字型或大小有關嗎?
我有些改過的檔案還是一樣可以compile阿
吼 謝謝大家的回答
--
Love is standing on a door way just to see
if she happens to come walking by
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.220.211
推 zeat:你的筆記本編碼是...? 04/12 00:20
→ shenevol:我不知道要怎樣看耶@@ 04/12 00:23
推 zeat:那你存檔案的編碼有更改過嗎? 沒有的話, windows預設是ANSI. 04/12 00:26
→ zeat:應該不會有問題, 怕你另存成其他格式. e.g. unicode... 04/12 00:27
→ zeat:那就有些問題了... 04/12 00:28
→ shenevol:喔喔 那要怎樣check阿 我在筆記本裡按右鍵嗎? 04/12 01:05
推 szss8765:編碼的問題?英文怎麼會有編碼的問題? 04/13 00:43
推 MOONRAKER:檔案開頭的BOM害的吧 04/13 10:22