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

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -