In Java, is there a null existing object on the heap?
I am trying to understand the difference between an uninitialized local variable (which does not compile) and one initialized null (which compiles).
Look here:
Java IAQ: Frequently Asked Questions: Is a null object?
Or, to save the click, the answer is no, this is not an object. A value of null means that the object is not referenced.
. , :
i
null
:
Integer i; i = null; i = Integer.valueOf(1); i++;
, ?
; . , null, . Java. , .
: . - -, , deviant bytecode .
, , , null. JVM, .
, , - . . , , .
Null . , , null. , null, . , , , .. . , - .
Java , . Java , , . , C, . Java : 0, 0.0, false null .., . .: -)
Source: https://habr.com/ru/post/1766477/More articles:Обработка кликов для jQuery AJAX (с PHP) - jqueryInserting nodes into a linked list - javaGIT: является уникальным тегом для фиксации? - gitAJAX toolkit - problem with webservice execution - javascriptError accessing a Windows PGM socket with an account without administration - c #I need an event trigger for a switch when it is not set, because another button is checked - javascriptJava: can a child kill a parent? - javaWhat is the best way to handle dates and times in PHP prior to 5.3? - phpApply affine transform to view in Interface Builder - iphoneNumber of number lines in file - objective-cAll Articles