package cn.com.createfile;
import java.io.*;
public class CreateFile {
String file_name;
String expand_name;
File=file;
public CreateFile()
{
BufferedReader b=new BufferedReader(new InputStreamReader(System.in));
System.out.println("please enter the file name:");

try{
expand_name=b.readLine();
}catch(IOException e){}
if(file_name!=null)
System.out.println("please enter the file expand name:");

else return;
try{

    File file = new File(file_name+"."+expand_name);
file.createNewFile();
}catch(IOException e){}
}
/**
 * @param args
 */
public static void main(String[] args) {
// TODO Auto-generated method stub
CreateFile creatfile=new CreateFile(); }}