Kamis, 24 November 2016

what is the class of the string in java

A string can be created in Java using the following alternatives:   1 2 String s1 = “This is string s1.”; String s2 = new String(“This is string s2.”);   In line 2, we are using a String constructor along with the new operator to create the string explicitly. In line 1, the whole process (creation of string) is done implicitly by JVM.   If the content of the newly created string matches with the existing string (already available in memory), then a reference to the existing string in the memory is returned instead of allocating new memory. Since strings created

The post what is the class of the string in java appeared first on Coding Security.


what is the class of the string in java
read more

Tidak ada komentar:

Posting Komentar