Search:

Type: Posts; User: elamre

Search: Search took 0.07 seconds.

  1. Replies
    11
    Views
    1,732

    Re: Beginner for loop

    String day = "";
    for (int i=0; i< days.length; i++) {
    if (!dag.equals(day)) {

    This part, what should it do?
  2. Replies
    11
    Views
    1,732

    Re: Beginner for loop

    What do you want to achieve exactly? I'm not quite understanding the purpose of this yet.
    Also post your full output. This is what i did:

    public static void main(String[] args){
    String[]...
  3. Replies
    11
    Views
    1,732

    Re: Beginner for loop

    String[] days = { "Monday", "Tuesday", "Wednesday", "Turshday", "Friday", "Saturday", "Sunday" };
    String day = "";
    for (int i = 0; i < days.length; i++) {
    day += days[i]; // previously...
  4. Replies
    11
    Views
    1,732

    Re: Beginner for loop

    Ah ok. Your day array has a length of 7 (Monday-Sunday are 7 days). Agreed? So the days.length will return 7. Only the thing is, it starts at 0 instead of 1. So "Monday" will be 0. and then it will...
  5. Replies
    11
    Views
    1,732

    Re: Beginner for loop

    What is line 32?
Results 1 to 5 of 5