I see an example code that uses the new Runnable (), and this is an anonymous inner class.
Runnable runnable = new Runnable() { public void run() { int option = (int) (Math.random() * 4); switch (option) { case 0: xa(); break; case 1: xb(); break; case 2: ya(); break; case 3: yb(); break; } } };
Any help is appreciated. I am new to this.
source share