I cant figure out how to check the array for AND and OR. please, help, i got stuck

my code:

import java.util.Scanner;

public class BooleanProduct

```
import java.util.Scanner;
public class BooleanProduct
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
int[][] A = new int[10][10];
int[][] B = new int[10][10];
int[][] C = new int[10][10];
int m,n,p,q;
System.out.println("Enter number of rows for matrix A : ");
m = input.nextInt();
System.out.println("Enter number of columns for matrix A : ");
n = input.nextInt();
System.out.println("Enter number of rows for matrix B : ");
p = input.nextInt();
System.out.println("Enter number of columns for matrix B : ");
q = input.nextInt();
System.out.println("Enter elements for matrix A (by rows): ");
for (int i=0 ; i < m ; i++)
for(int j=0 ; j < n ; j++)
{
A[i][j] = input.nextInt();
}
System.out.println("Enter elements for matrix B : ");
for (int i=0 ; i < p ; i++)
for(int j=0 ; j < q ; j++){
B[i][j] = input.nextInt();
}
System.out.println("Matrix A: ");
for(int i=0 ; i < m ; i++)
{
System.out.println();
for(int j=0 ; j < n ; j++)
{
System.out.print(A[i][j]+" ");
}
}
System.out.println();
System.out.println("Matrix B: ");
for (int i=0 ; i < p ; i++)
{ System.out.println();
for(int j=0 ; j < q ; j++){
System.out.print(B[i][j]+" ");
}
}
System.out.println();
}
}
System.out.println("Boolean Product of matrices A and B is: ");
{
i=0;
j=0;
if (A [i][j]==1 && B [i][j]==1)
{
temp C [i][j] = 1;
i++;
j++;
}
else
{
C [i][j]= 0;
i++;
j++;
}
}
{
```

.... i lost it here...how can i store the value, because i need it than to compare it with OR ||