int decVal = 26; // The number 26, in decimal
int octVal = 032; // The number 26, in octal
int hexVal = 0x1a; // The number 26, in hexadecimal
like is there any speed advantage in what you choose?
Name:
Anonymous2009-02-06 21:41
All of these are shitty amateur hacks, and nothing more. Real Java Programmers use an AbstractConstantsFactoryFactorySingleton, an associated XML loader, and retrieve their constants from a dynamically generated file on their Enterprise Edition Constants Server which allows increased flexibility of the code and easy redeployment on any system throughout the world while keeping a realtime-equivalent performance and maximizing their productivity through their object-oriented frameworks.
>cat anus.java
public class anus
{
public static void main(String args[])
{
int decVal = 26;
int octVal = 032;
int hexVal = 0x1a;
}
}
>javap -c anus
Compiled from "anus.java"
public class anus extends java.lang.Object{
public anus();
Code:
0: aload_0
1: invokespecial #1; //Method java/lang/Object."<init>":()V
4: return