Search:

Type: Posts; User: Mr.777

Search: Search took 0.10 seconds.

  1. Replies
    9
    Views
    2,418

    [SOLVED] Re: Linear array search(without Arraylist)

    What if you couldn't find any element?
    What will happen? You code will never go to


    if(flag !- true)

    part. That's why it is recommended to use opening and closing brackets for the beginners....
  2. Replies
    9
    Views
    2,418

    [SOLVED] Re: Linear array search(without Arraylist)

    I have never seen any condition in which if (IF part) executes successfully, (Else part) will execute too. break is for breaking out of the loop. OP doesn't want to break out the loop but to avoid...
  3. Replies
    9
    Views
    2,418

    [SOLVED] Re: Linear array search(without Arraylist)

    Looking at your code, there can be three possibilities.
    1. Either the list you are passing to function is has no values. Or
    2. There is no such item.
    3. Case doesn't match. (Either use...
Results 1 to 3 of 3