Link to home
Start Free TrialLog in
Avatar of shahrine99
shahrine99

asked on

Java

How do I know how large is the byte code of my program? I wrote a calculator program using java AWT.
Avatar of Mayank S
Mayank S
Flag of India image

You can see the file size in your OS. For example if it is Windows, you can see the file size in Windows Explorer.
You can also write another program to do the same. You can load the file class information into a java.io.File object and use the length () method. See this example:

http://www.exampledepot.com/egs/java.io/GetLength.html?l=rel
Avatar of shahrine99
shahrine99

ASKER

so u mean, where I saved my program, I put my mouse over the file and I see a blog and it said size: 9.05 KB ..is dat how big my program is?
ASKER CERTIFIED SOLUTION
Avatar of Mayank S
Mayank S
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
awesome...i learned something =)
hey another question...on the main.java file..i see the size is 8,964. Is dat in KB, MB or wat?
That is KB