Does java define string as null terminated? -


this question has answer here:

as title suggests, it's theoretical question. i'd know if java defines string null terminated.

i'd know if java defines string null terminated.

no. string defined fixed length sequence of char values. possible char values (from 0 65535) may used in string. there no "distinguished" value means string ends.

so how track string ending? using length?

yes. string object has private length field (in implementations i've examined ...).

if want understand more how java strings implemented, source code various versions available online. google "java.lang.string source".


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -