dynamic-variables tag

1 questions


1 answers
67 views
0
Assigning a Dynamic Name to a Variable in Java

I want to assign a value on multiple variables in Java as follows.int n1,n2,n3;for(int i=1;i<4;i++){ n<i> = 5;}How can I do it in Java?


© 2024 OneMinuteCode. All rights reserved.