// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
package test;

import javax.enterprise.context.RequestScoped;

@RequestScoped
public class A {
    private static int total = 0;
    private int n;
    public A() {
        total++;
        n = total;
        System.out.println("One A created");
    }
    @Override
    public String toString() {
        return n + " of " + total;
    }
    @Override
    public void finalize() {
        System.out.println("One A destroyed");
    }
}
