As in the previous example, you have learned about how to print the current date on the screen. But in this example we are going to convert the date into string.
java.util.Hashtable package contains a method called tostring, that is used to convert the date into string.
public String toString()
Output of the Convert Date To String MIDlet will be as follow..
Output of the command prompt
Source Code of DateToString.java
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial