I have got a 2d String array. How can I check a slice of it? For example row 3, up to 6th element there
I have tried
String arr[][] = new String[3][6]
arr[3][4] = "example"
if (Arrays.asList(arr).subList(3,6).contains("example"))
System.out.print("yes");
But this doesn't work. It works only for 1d array? Also, instead of using contains how can one check whether all elements are null in the slice array?
array[3][6], what you mean bu slicing further ?arr[3]?