In other words the check should be the same as this one at the top, where I individually check for every day:
if (opgCheck == true) {
if (dag.equals("Monday") || dag.equals("Tuesday") ||...
Type: Posts; User: gerre
In other words the check should be the same as this one at the top, where I individually check for every day:
if (opgCheck == true) {
if (dag.equals("Monday") || dag.equals("Tuesday") ||...
The code should probably look like this:
String day = "";
for (int i=0; i< days.length; i++) {
day += days[i];
if (!dag.equals(day)) {...
Well, the end product should be to add data to a database. This particular part of the class is supposed to check whether the entered input is a valid day. In other words the program should go: Is it...
Yeah I can also print it. But the if statement somehow doesn't wanna work. Pitty since I now need to test for the days individually so it says Monday OR Tuesday etc. It just doesn't look good that...
I can see where you are going, and it solved a problem I probably would have run into at some point (Removed the =). But it does not solve the problem itself. I tried to change a bit in that line 32,...
Line 32 is:
day.equals(day + days[i]);
Hi guys
I'm having a bit problem with my for-loop, and would just want to hear if i'm way of, or if there is something small i'm missing.
String[] days = {"Monday", "Tuesday", "Wednesday",...