Tony
Posts: 1
Nickname: sekker
Registered: Mar, 2002
|
|
Using wrapper classes
|
Posted: Mar 31, 2002 1:30 AM
|
|
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;
public class Log{
private static int SerialNumber; //must be static to be referenced by main
private int StorageCounter;
private static Object Content;
private String ClassContent;
private static Date CreationDate;
private static int PackagedOnDate;
public static void 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.
thanks
|
|