What is the difference between uninitialized object variable and object variable initialized to null in Java?
There is no difference for class fields. They are null by default for objects, 0 for numeric values and false for booleans.
For variables declared in methods - Java requires them to be initialized. Not initializing them causes a compile time error when they are accessed.
What's the reason? Class fields can be modified by any method. In any order the method is invoked. All non-private fields may be modified by other classes and/or classes extending that class. Hence, there is no point in notifying about an uninitialized variable, since it may be assigned in many, many places.
Variables inside methods, however, are local and can be modified only inside the method itself. Hence it is both possible and rational to point possible mistakes. And the compiler tries to do it. If it knows the field is not initialized, it will show an error, because that's never what you want. If it is not sure - it will give a warning, so that you can make sure.