java - Storing arrays in strings -


why storing array in string work if do

for(int i=0;i<testing.length;i++)     string mark += testing[i]; 

but

for(int i=0;i<testing.length;i++)     string mark = testing[i]; 

will not work , produce error saying cannot convert int testing array cannot converted type string

the first way uses string concatenation, special cased in java language allow use object or primitive type. however, cannot assign random value string.


Comments

Popular posts from this blog

multithreading - Exception in Application constructor -

React Native allow user to reorder elements in a scrollview list -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -