Hi,
I'm trying tolearn
java, didn't even know it was a prog language 5 days ago - so bare with me.
I have a boolean array, let's call it when:
boolean[] when = new boolean[7];
I have an enum that looks kinda like this:
enum weekday {
mon("Mondays suck!"),
tue("Tuesdays suck, too!"),
...
sun("Sundays don't suck so much.");
{
private final
String s, this.s=s andsoforth.
Now: I want my program to output
for (i=0; i<7;i++) {
if (when[i]) sysout(...well, that's kinda the problem! How do I tell the program that when i=0 and when[0] is true to print weekday.mon? Should I write the enum differently? It would really be a little bit of a pain to change the boolean[], as it is used elsewhere in the program, but if that makes more sense: bring it on.
You said no question too simple...
Thanks a bunch, Martin