-
Recent Posts
Recent Comments
- Brian on How to plot multiple UK addresses (by postcode) on a Google Map
- Mark on How to plot multiple UK addresses (by postcode) on a Google Map
- Mark on How to plot multiple UK addresses (by postcode) on a Google Map
- Brian on Interview advice for PGCE ICT with Computing at KCL / IOE
- Brian on Blatant racist discrimination in advertisements
Tag Cloud
abstract accommodation array bursary Chrome date email enumerated type exam Excel fields finance generics Google greenfoot GTP GTTR hardware ICT interview Java KCL laptop linux literature review LMC London network news object OOP Oracle PGCE primary programming QTS QTS tests SER shortcut SSA static travel ubuntu UML variablesArchives
Categories
Meta
Tag Archives: date
Student (Java class) example
Here’s my Java source code for a Student class with fields for id, name, and createdDate. The static field counter is used for automatically assigning student id numbers. In another post, I will extend this code for use with generics … Continue reading
Formatting dates using java.text.DateFormat
Simple example showing use of the DateFormat object: This produced the following output on my computer: Sat Jul 23 09:46:30 ICT 2011 23/07/11 09:46 23-Jul-2011 23/07/11 23-Jul-2011 23 July 2011 Saturday, 23 July 2011
Java SE 6 Date and Calendar classes (simple example)
This example shows how the Calendar getTime() method can be used to return a Date object. It also demonstrates simple use of the Calendar add() method to increment a date. The program produced the following output: now = Sat Jul … Continue reading
Getting the current date and time using java.util.Date
Most methods of the Java SE 6 Date class have been deprecated. Nevertheless, it still has its use in providing an an easy way to get the current date and time. Here is a very simple example: When I ran … Continue reading