|
What this is
Other links
The source code/* * ClassOne.java * * Created on 23 February 2004, 15:49 */ package org.netbeans.test.rollback; /** * * @author Dan */ public class ClassOne { private static int instanceCounter = 0; static ClassOne defaultInstance = null; /** Creates a new instance of ClassOne */ public ClassOne() { instanceCounter++; } public static void go() { System.out.println("started"); for (int x = 0; x < 10; x++) { new ClassOne(); } System.out.println("finished"); } public static int getCounterValue() { return instanceCounter; } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.