Can anyone assist in helping me to understand wrapper classes. I am trying to write a piece a code that will record a log of how, when and how many times an object and/or a class has been used in a java program.
I think it starts something like
import java.util.Date;
import java.util.Vector;
publicclass Log{
privatestaticint SerialNumber; //must be static to be referenced by main
privateint StorageCounter;
privatestatic Object Content;
private String ClassContent;
privatestatic Date CreationDate;
privatestaticint PackagedOnDate;
publicstaticvoid main (String[] args)
{
Date CreationDate=new Date(); //creates a Date object
Log b = new Log(); //creates an object of Log
SerialNumber= 1;
if (SerialNumber==0)
SerialNumber++ ;
System.out.println("Serial Number of :" + SerialNumber);
System.out.println("Creation Date:" + CreationDate);
}
} //close class
To be fair I am very new to Java and do not really know where to begin.
Is there someone out there who could point me in the right direction.