Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

find if a value is in a 2d array java

public boolean findValue (int[][]arr, int value)
    for(int i=0; i<arr.length;i++)
    {
        for(int j=0; j<arr.length;j++)
        {
            if(arr[i][j]==value)
                return true;
        }
    }
    return false;
}
Comment

PREVIOUS NEXT
Code Example
Java :: find if a value is in a 2d array java 
Java :: isblank vs isempty 
Java :: java queue 
Java :: java set label color 
Java :: java iterate through map 
Java :: create file from byte array java 
Java :: java output 
Java :: java number 
Java :: install java 8 on windows 10 
Java :: slice array java 
Java :: test if string is float java 
Java :: check character is alphanumeric java 
Java :: system.out.print two dimensional array 
Java :: create a toast message in android 
Java :: {} when initialising arraylist java 
Java :: android studio set text of textview 
Java :: java define empty string list 
Java :: java try catch 
Java :: event api spigot 
Java :: reverse string using recursion java with explanation 
Java :: java get sub array 
Java :: how to hide menu items in android 
Java :: char array to arraylist java 
Java :: foreach java 
Java :: byte array to base64 string 
Java :: how to read input in java 
Java :: java indexof array 
Java :: java print hello world 
Java :: how to create relative layout in android studio 
Java :: permission foreground_service 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =