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

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -