Fault in the program

What is the possible fault in this program?
Scanner obj = new Scanner(System.in);
int n = obj.nextInt();
int m = obj.nextInt();
int k = obj.nextInt();
int s = obj.nextInt();

	if(n>=0 && m>=0 && k>=0 && s>=0){
		if(n<=100 && m<=100 && k<=100 && s<=100){
			char[][] arr = new char[n][m];
			for(int i=0; i<arr.length; i++){
				for(int j=0; j<arr[i].length; j++){
					arr[i][j] = obj.next().charAt(0);
					while(arr[i][j]!='.' && arr[i][j]!='*' && arr[i][j]!='#'){
						arr[i][j] = obj.next().charAt(0);
					}
				}
			}
			int i;
				for(i=0; i<arr.length; i++){
					for(int j=0; j<arr[i].length; j++){
						if(s>=k){
							if(arr[i][j]=='.'){
								s-=2;
								s-=1;
							}else if(arr[i][j]=='*'){
								s+=5;
								s-=1;
							}else if(arr[i][j]=='#'){
								break;
							}
						}else{
                            break;
                        }
                        if(j==arr[i].length-1){
                            s+=1;
                        }
					}
				}
				if(i==arr.length){
					System.out.println("Yes");
					System.out.println(s);
				}else{
					System.out.println("No");
				}
		}
	}

HI @Ekram,
There are many error in your program . i have corrected them and added comments in the code … please check them.
Ide is not working … so i am giving code here … afterward i will send you link

import java.util.*;

public class test {
public static void main(String args[]) {
Scanner obj = new Scanner(System.in);
int n = obj.nextInt();
int m = obj.nextInt();
int k = obj.nextInt();
int s = obj.nextInt();

	if (n >= 0 && m >= 0 && k >= 0 && s >= 0) {
		if (n <= 100 && m <= 100 && k <= 100 && s <= 100) {
			char[][] arr = new char[n][m];
			for (int i = 0; i < arr.length; i++) {
				for (int j = 0; j < arr[i].length; j++) {
					arr[i][j] = obj.next().charAt(0);
				}
			}
			int i;
			int max = 0; // Keep a max variable
			for (i = 0; i < arr.length; i++) {
				for (int j = 0; j < arr[i].length; j++) {
					if (s >= 0) {
						if (s > max) {
							max = s;
						}
						if (j != 0) { // First shift to other row does not deccresase strength
							s--;
						}
						if (arr[i][j] == '.') {
							s -= 2;
						} else if (arr[i][j] == '*') {
							s += 5;
						} else if (arr[i][j] == '#') {
							if (j == 0) {
								s--;
							}
							break;
						}
					} else {
						System.out.println("No"); // Terminate the program here
						return;
					}
				}
			}
			if (i == arr.length && s >= k) {  //S must be greater than k

				System.out.println("Yes");
				System.out.println(s); // Display max
			} else {
				System.out.println("No");
			}
		}
	}
}

}