Friday, November 16, 2007

Static .. Static Variable

Here are smart card programming rules :
  • It is better to use static variable then use instance variable.
  • Constants variable should be declare as static final variable
  • Local variable is accessed faster than global variable
Example Declaration Variable in Smart Card Web Server :
public static final byte[] PARAMETER = { 'P', 'a', 'r', 'a', 'm', 'e', 't','e', 'r', ' ', ':', ' ' };
public final static byte[] PROTOCOL = { 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', ':' };

No comments: