Hello Edward!
Here you code with a bit correction.
Date time1=new Date();
Long times=new Long(time1.getTime());
String startTime=times.toString();
> I want to convert time operation,like follows:
> Date time1=new Date();
> long times=time1.getTime();
> String startTime=times.toString();
>When I compile it,it raise errors:
>F:\java>javac test.java
>test.java:40: long cannot be dereferenced
String startTime=times.toString();
^
>test.java:47: cannot resolve symbol
>I know from java1.3.1 doc,Java has method public String toString(),it >returns a String object representing this Long's value.But why I get >errors?
>Any idea will be appreciated!
>Thanks in advance
>Edward