I Make a J2ME Application and I just want to print the system date and time, and when I search I found this class that used for that purpose, but I didn’t find it in J2ME to use it.
How can I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Is this enough for what you need?
Calendar cal = Calendar.getInstance(); StringBuffer date = new StringBuffer(); StringBuffer time = new StringBuffer(); date.append(cal.get(Calendar.DATE)).append('/'); date.append(cal.get(Calendar.MONTH) +1).append('/'); date.append(cal.get(Calendar.YEAR)); time.append(cal.get(Calendar.HOUR_OF_DAY)).append(':'); time.append(cal.get(Calendar.MINUTE)).append(':'); time.append(cal.get(Calendar.SECOND));