| adm | Find | login register |
eliu joined: 2007-08-09 posted: 11478 promoted: 617 bookmarked: 187 新竹, 台灣 |
我不怎麼喜歡 java,我覺得 C 很多方面比 java 簡單又直接。最近因為在 Android 開發 AP,不得不用 java 來看一個很簡單的 example 我想要把 a.txt 依欄位一行一行讀進去 在 C 我們可以用 fscanf,輕鬆搞定,也很容易看懂。 #include <stdio.h> FILE *fp; if (fp=fopen("a.txt", "r"))==NULL) while (!feof(fp)) { fclose(fp) 在 java 很麻煩 import java.io.BufferedReader; try{ in.close(); edited: 3
| |||||||
Guest joined: 2010-06-05 posted: 57 promoted: 2 bookmarked: |
| |||||||
sendxp joined: 2009-06-24 posted: 101 promoted: 23 bookmarked: 6 地球 |
Maybe can try golang or Scala... | |||||||
eliu joined: 2007-08-09 posted: 11478 promoted: 617 bookmarked: 187 新竹, 台灣 |
|
| adm | Find | login register |