|
The Java Language Specification (http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#392 45) calls that a "static initializer". PC2 -----Original Message----- From: Mike Wills [mailto:programmer@koldark.net] Sent: March 6, 2002 11:09 To: java400-l@midrange.com Subject: Have you seen anything like this? In my java class yesterday, my instructor went over a new constructor type thing. He called it a class constructor. Here is an example: public class Test { static { set of instructions here } Test() { set of instructions here } . . . } Basically what he said it does is to set up some initial class based stuff the first time the class is used in the program. Like we are going over linked lists, and he used the example of setting up a dummy node. Has any seen something like this before? What is it actually called? I would like to tell him, "Yes that is what it is called," or "It is actually called ...." <VBG>
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.