Search:

Type: Posts; User: gerre

Search: Search took 0.28 seconds.

  1. Replies
    11
    Views
    1,737

    Re: Beginner for loop

    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") ||...
  2. Replies
    11
    Views
    1,737

    Re: Beginner for loop

    The code should probably look like this:

    String day = "";
    for (int i=0; i< days.length; i++) {
    day += days[i];
    if (!dag.equals(day)) {...
  3. Replies
    11
    Views
    1,737

    Re: Beginner for loop

    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...
  4. Replies
    11
    Views
    1,737

    Re: Beginner for loop

    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...
  5. Replies
    11
    Views
    1,737

    Re: Beginner for loop

    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,...
  6. Replies
    11
    Views
    1,737

    Re: Beginner for loop

    Line 32 is:


    day.equals(day + days[i]);
  7. Replies
    11
    Views
    1,737

    Beginner for loop

    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",...
Results 1 to 7 of 7