/* Requirement: Get a paragraphProgramPrinciple of running time: Get the start time and end time of the program and subtract it to get the time: use an existing class in Java: system. currenttimemillis (); whenCodeAfter optimization, we can solve this type of problem. What is the template method design pattern and determination method? When defining a function, part of the function is definite, but some are uncertain, and the definite part is using the uncertain part, this exposes the uncertain part, completed by the subclass of this class */abstract class gettime {public final void gettime () {long start = system. currenttimemillis (); runcode (); long end = system. currenttimemillis (); system. out. println ("program running time (millisecond):" + (end-Start);} public abstract void runcode ();} class subtime extends gettime {public void runcode () {for (INT x = 0; x <250; X ++) {system. out. print (". ") ;}} class template Demo {public static void main (string [] ARGs) {subtime Gg = new subtime (); GG. gettime (); // system. Out. println ("Hello world! ");}}