SyntaxFix
Write A Post
Hire A Developer
Questions
If the Integer is not null
Integer i; Long long = Long.valueOf(i);
i will be automatically typecast to a long.
i
long
Using valueOf instead of new allows caching of this value (if its small) by the compiler or JVM , resulting in faster code.
valueOf
new