Statment level LOC, Method and Class are three variables that we played with. Keeping LOC and class constant we changed methods. Here are the numbers,
Methods | Jar Size (Bytes) | Delta for additional method |
1 | 1301 | |
2 | 1320 | 19 |
3 | 1339 | 19 |
Keeping LOC contant, we added classes (and in first three additions a new method also came about)
Methods | Jar Size (Bytes) | Delta for additional method | |
1 | 1301 | ||
2 | 1738 | 437 | |
3 | 2167 | 429 | |
4 | 2605 | 438 | |
5 | 2913 | 308 | Empty class added |
So, for every method add a 19B and every class add a 308-400B hit is there.
Here is the class that we were playing with,
public class HelloWorld {
public void say()
{
System.out.println("H");
System.out.println("e");
System.out.println("l");
System.out.println("l");
System.out.println("o");
}
}
For methods we had,
public class HelloWorld {
public void say()
{
System.out.println("H");
System.out.println("e");
System.out.println("l");
System.out.println("l");
System.out.println("o");
}
public void say1()
{
System.out.println("W");
System.out.println("o");
System.out.println("r");
}
public void say2()
{
System.out.println("l");
System.out.println("d");
System.out.println("!");
}
}