Read directory

import java.io.*;
import java.io.File;
public class Test_This {
public static void main(String[] args) throws IOException
{
// TODO Auto-generated method stub
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String str ="";
Process pp = new Process();
try{
//System.out.println("---While Loop---");
System.out.print("Please Enter a File name: ");
str = br.readLine();
pp.process(str);

}//try
catch(NumberFormatException e)
{ System.out.println("data was blank");}

}
}
class Process {

public void process(String str)
{

//try {
File file = new File(str);
// Create file if it does not exist
//boolean success = file.createNewFile();
// boolean del = (new File(str).delete());
String parentPath= "", parentdir ="";
if (file.isDirectory()) {


//System.out.println("File " + str + " has : been deleted");
String s[] = file.list();
for (int i = 0; i < s.length; i++)
{
File flist = new File(str + "/"+ s[i]);
if (flist.isDirectory()){
parentPath = file.getParent();
parentdir = file.getAbsolutePath();
System.out.println("parent " + parentPath+ " " + parentdir + "/" + s[i]+ " is directory " + file.isDirectory());

}
}
} else {
System.out.println("File " + str + "does not exits");
}
// } catch (IOException e) {
//}
}
}