import java.text.parseexception;

import java.text.simpledateformat; import java.util.date; public class getrandomtiem { public static void main(string []args){ simpledateformat format = new simpledateformat("hh:mm:ss"); date randomdate=randomdate("00:00:00","24:59:59"); string randomdats="shi"+randomdate.gethours()+"f"+randomdate.getminutes()+"m"+randomdate.getseconds(); system.out.println(randomdats); } private static date randomdate(string begindate,string enddate ){ try { simpledateformat format = new simpledateformat("hh:mm:ss"); if(start.gettime() >= end.gettime()){ return null; } long date = random(start.gettime(),end.gettime()); return new date(date); } catch (exception e) { e.printstacktrace(); } return null; } private static long random(long begin,long end){ if(rtn == begin || rtn == end){ return random(begin,end); } return rtn; } }