0
mainメソッドへの引数としてファイルの名前を渡すことはできません。ここに私のコードは、あなたがでそれらを渡すことができます...java - mainメソッドへの引数の受け渡し
import java.io.*;
class four {
public static void main(String args[])throws IOException{
int i;
FileInputStream fin = null;
try{
fin = new FileInputStream(args[0]);
}catch(FileNotFoundException e){
System.out.println("File not found........");
}catch(IndexOutOfBoundsException e){
System.out.println("Index out of bound........");
}
do{
i = fin.read();
if(i != -1)
System.out.println(i);
}while(i!=-1);
fin.close();
}
}
例外は何ですか?コマンドラインで何を書いたのですか? –