Do you have a negative string length? If so, is it the same as null?
No; string length is 0 (empty string, represented as "") or higher. And the empty string does not coincide with the null (in Java it is not called a null string ).
""
To better understand what null means in Java, you can check the following questions:
No never.
length is an unsigned number; it cannot be negative.
the first answer to the question denies the second legitimacy of the question.
. - . Null .
String.length() legth int, .
String.length()
int
javadoc , , .
.
, , length()
public int length() { return count; }
, count -1 int. , .
count
, , (, -1) , 0
Source: https://habr.com/ru/post/1793251/More articles:Passing data from script action to javascript - javascriptPostgreSQL: modification procedure parameter - plpgsqlErlang: is there a way to export some other modules from my module? - exportWithout eval (), is it possible to compile JavaScript into binary files? - performancehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1793250/facebook-application-that-allow-users-to-upload-image-to-the-application-album&usg=ALkJrhiZ9V0pKey9g1U_tSFKUDtGdRvKtgMessageBox in GWT - javaHTML text analysis - htmlEmail notifications not sent from God's gem - ruby | fooobar.comHow to create a custom message from a custom Mockito ArgumentMatcher? - mockitoAnother Java coder novice requiring approval - javaAll Articles