long myvariable; can’t have value null but Long myBigVariable; can, so I want to convert/cast myvariable to big Long so I can assign it value of null. How can I do that?
I tried myvariable = new Long(null); and myvariable = (Long)(null); they both failed, is there another solution to this ?
I can’t change myvariable to type Long, it has to stay long.
In order to create a null Long:
EDIT: I can’t change myvariable to type Long, it has to stay long.
Then no, you cannot set a primitive to null.