Help us understand the problem. What is going on with this article?

ふぁ、ファイルが作れない!

More than 3 years have passed since last update.

File fromF = new File(ret[0]);じゃ、ダメ。File fromF = new File(ret[0].trim())でなくっちゃ!;

    File fromF = new File(ret[0].trim());
    if(fromF.exists()){
        System.out.println("存在");           
    }else{
        System.out.println("不在");
    }

実行結果は、「存在」
しか〜し、
File fromF = new File(ret[0]);
if(fromF.exists()){
System.out.println("存在");

}else{
System.out.println("不在");
}
だと、実行結果は、「不在」となるんですね。

uramoty
System architects, programmers 1949 born
http://x-fer.info
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away