Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.
Say I have an array of Strings like {abc, def, ghi, jkl, mno} and I want to make a list of variables with names nameabc, name def, nameghi, namejkl, namemno. Is it possible to make Strings as variable names?
I don't see why you'd want to do that? As in, you have a load of variables, and you want to make variables out of them? Why not just use the original variables in the array to store whatever values it is you would assign to the variable variables?
I think I asked the wrong question, but it's the same concept. My JAVA program takes a year and finds the Friday the 13ths in that year. To do this, I do:
Calendar calendar1 = new GregorianCalendar(year, Calendar.JANUARY, 13);
day = calendar1.get(Calendar.DAY_OF_WEEK);
If the day equals 6, I print out the full date.
I repeat this for each month. It's a pretty simple problem, but I thought I'd be able to run it through a loop where the MONTH is being changed.
I thought I could just do a foreach through an array with JANUARY...DECEMBER and make the JANUARY in Calendar.JANUARY change to the other months.
I originally started my main programming in PHP, so I knew you could do it in PHP. That's why I thought it might be possible in JAVA, I asked my professor if he knew how to do it and he said no.
I know in JavaScript and Perl you can do something like eval(var $varvar) (ignore the syntax) and that will turn whatever $varvar is into a variable. I don't know if Java has a similar function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.