Question: can null be assigned to int in java?
Answer: In Java, int is a primitive type and it is not considered an object. Only objects can have a null value. So the answer to your question is no, it can't be null. ... Depending on your check method, you could be returning an int or an Integer.