Java Random Name getRandomFileName()

Here you can find the source of getRandomFileName()

Description

get Random File Name

License

Apache License

Declaration

public static String getRandomFileName() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.SimpleDateFormat;

public class Main {

    public static String getRandomFileName() {
        String fileName = "";
        java.util.Date dt = new java.util.Date(System.currentTimeMillis());
        SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMddHHmmssSSS");
        fileName = fmt.format(dt);//from   w w w  .  j  a v a  2  s.  c om

        return fileName;
    }
}

Related

  1. getRandomName()
  2. getRandomName()
  3. getRandomName()
  4. randomFileName()