KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > perf > test1 > StaticCallTest


1 package test.perf.test1;
2
3 import java.lang.reflect.*;
4
5 import test.perf.AbstractTest;
6 import test.perf.Foo;
7
8 /**
9  * Class tc1.
10  *
11  * @author Mika Riekkinen
12  */

13 public class StaticCallTest extends AbstractTest {
14     public void init() {
15         // Make one call to load Foo into JVM
16
Foo.static_method();
17     }
18
19     public void test(int lCount) {
20         for (int i = 0; i < lCount; i++) {
21             Foo.static_method();
22         }
23     }
24 }
25
Popular Tags