Ask your own question, for FREE!
Computer Science 7 Online
OpenStudy (javk):

Is it possible to create an array of previously declared variables in java?

OpenStudy (anonymous):

you can not used it again for declaring array you must write down the syntax list = new int[5];

OpenStudy (javk):

wait...I figured it out, you can provided they are all the same variable type. Like for instance I had 4 variables ``` int taxband1; int taxband2; int taxband3; int taxband4; ``` what I did was ``` int{} tax = {taxband1, taxband2, taxband3, taxband4}; ``` it worked

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!