Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is is better to use static variables?

843851Oct 16 2007 — edited Oct 18 2007
Hi,
Does anyone know if it's better to use static variables or to use normal variables?

Concerning the size of the code, it seems that declaring a variable as static is more consuming (for example plus 6 bytes for an object reference).

So this could mean that declaring variables as static should be avoided, but what about the execution time?

Some years ago, some javacard gurus were claiming that it's was better to use static variables (less processing required by the JVM to resolve adresses of static variables), but is it still the case?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2007
Added on Oct 16 2007
3 comments
163 views