java - Variable declaration with its name containing value from loop -


i php developer started @ java want declare dynamic variables inside loop , have append loop value varaible name want .

i make statement (i=1; i<6; i++) { string new_variable_ + i; } 

the above code not work in java how ?

what trying not possible in java ... language not lose php..its type strict language


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -