KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > perf > Foo


1 package test.perf;
2
3 /**
4  * Class Foo.
5  *
6  * @author Mika Riekkinen
7  */

8 public class Foo implements FooInterface {
9     public static Object JavaDoc static_field = new Object JavaDoc();
10
11     public static void main(String JavaDoc [] args) {
12         long l1 = System.currentTimeMillis();
13         for (int i = 0; i < 100000; i++) {
14             static_method();
15         }
16         long l2 = System.currentTimeMillis();
17         System.out.println("Foo.main(...) executed in " + (l2-l1) + " ms");
18     }
19
20     public static void static_method() {
21     }
22
23     public void virtual_method() {
24     }
25 }
26
Popular Tags