I have a primitive type int "pubNumber" in Java.
I want to convert it to "Long"(not primitive), As per my understanding, there are below ways to do the same.
1. Long.valueOf(pubNumber)
2. (long) pubNumber
3. new Long(pubNumber)
Can anyone please help me on which one is the best way to do the same and why?