java-Passing argument into main method
<p>i can't pass the name of files as argument to the main method. here is my code...</p>

<pre><code>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();
}
</code></pre>

<p>}</p>
