There can be many instances of MIDlets that share classes and data between them. Implement a MIDlet suite that contains a class called Counter, intended to keep count of the number of instances of MIDlets that are running at any given time.

 public class Counter {
    
    private static int instances;
    
    public static synchronized void increment( ) {
        instances++;
    }
    public static synchronized void decrement( ) {
        instances--;
    }
    public static int getInstances( ) {
        return instances;
    }
}