Do you mean an example of the use of static methods in solving a real-time programming problem? You would not normally choose Java to implement a real-time (even soft real-time) process because of the possible impact of garbage collection (even if it runs as a low-priority thread). Do you have an example of an example in mind? Maybe you mean a program using just primitive data types and static methods, or possibly objects that once referenced are never released by setting the reference to null. Could you mean something like LeJos a JVM (which has no garbage collection) developed for Lego (TM) Mindstorms RCX bricks? -Barry [ January 04, 2003: Message edited by: Barry Gaunt ]
say u want to keep count of how many objects of a class u have. then have a static counter and a static method to increment the static counter(cos only static methods can change static variables). have the constructor call the static method, so the static variable is changed everytime the class is instantiated.