Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ファイルの終わりに到達する必要がありますが、到達していません。代わりに、空の文字列ではなく、スペースのようにも見えないこの奇妙な文字列を取得しています。これは、デバッガーから取得したものの画像です。
while ( (nextLine = csvReader.readLine()) != null && (nextLine != "")) { ... }
試す、
while( (nextLine = csvReader.readLine()) != null && !nextLine.equals("")) { ... }
私はいつもこれをしました:
Scanner scnr = new Scanner(file); while(scnr.hasNext()) { ... }
そして、私はそのような問題を経験したことがないと思います。