How to check whether a int is not null or empty?

Viewed 198596

I really dont know if this is possible or not. But I am strucking in a place where I want to check an int value is null or not, to call different methods.

Is there any way to do it?

Actually, variable comes from a browser with a null value. I cannot change the int declaration to Integer. Because it has it own consequences.

Any suggestions?

9 Answers

If you are receiving integer input, I would suggest checking if the text itself isn't empty, and then making a variable equal to it .toInt()

Related