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
Post a Comment