The Artima Developer Community
Sponsored Link

Java Answers Forum
Using wrapper classes

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Tony

Posts: 1
Nickname: sekker
Registered: Mar, 2002

Using wrapper classes Posted: Mar 31, 2002 1:30 AM
Reply to this message Reply
Advertisement
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

Topic: throw new Exception in servlets Previous Topic   Next Topic Topic: xml

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use