How to find a String element from array by taking input from user in java?

Viewed 13

I'll try to search the element but not getting the correct output Please check Below Code======>>

    for(int i=0; i<arr.length; i++)
    {
        if(arr[i]==name)
        {
            found=true;
            break;
        }
    }
    
0 Answers
Related