The first line declares a variable named num, but it does not actually contain a reference value yet. Since you have not yet said what to point to, Java sets it to null. In the second line, the new keyword is used to instantiate (or create) an object of type Integer, and the reference variable num is assigned to that Integer object. If you attempt to dereference num before creating the object ...
What is a CSRF token? What is its importance and how does it work?