How to get create date of file in java?

Below java code shows how to get create date of file in java –

[java]
/****************************************************************************************
* Created on 08-2011 Copyright(c) https://kodehelp.com All Rights Reserved.
****************************************************************************************/
package com.kodehelp.java.io;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
* Created by Vigilance India.
* User: https://kodehelp.com
* Date: Aug 4, 2011
*/
public class GetCreateDateOfFile {
public static void main (String args[]){
try{
// File class of java don’t provide any method to get the create date of file. So we have to
// get the create date in different way. We will be executing the windows command from java code
Process proc = Runtime.getRuntime().exec("cmd /c dir c:\\demofile.txt /tc");

BufferedReader br = new BufferedReader(new InputStreamReader(proc.getInputStream()));

String tempdata = "";

for(int i=0; i<6; i++){
tempdata = br.readLine();
}

System.out.println("Create Date/Time"+tempdata);

}catch(IOException ex){
ex.printStackTrace();
}
}
}

[/java]