The SlowMotion class is a custom java utility that is designed to provide a typewriter style printing effect by displaying text character by character with configurable delays between each character. It simulates slow motion by using Thread.sleep() to pause between printing two characters. The class supports printing various datatypes inlcuding strings, integers, longs, floats, doubles and generic objects using multiple overloaded print() and println(). Users can customize the delay interval either through the constructor (SlowMotion(delay (in ms))) or using updateInterval() method. By default the interval value is 125 milliseconds. The implementation skips delays for spaces, tabs and newlines achieving smooth slow motion effect. In case some error or some invalid value of interval is requested the code throws error and prints the relevant message in error stream. Below gif shows an example
Overloaded function for int, long, float, double, char, boolean, String and objects.
Overloaed println for int, long, float, double, char, boolean, String and objects.
Just System.out.println()
Clone this repository in your project folder.
Make the object of class SlowMotion You can see and run demo.java to understand how it wordks.
