With an array and a loop and a boolean. Review your arrays... chances are... your teacher wouldn't have you create 150 integer variables.
int[] integers = new int[150];integers[0] = 1; // Set your like 150 variables like thisintegers[1] = 2; boolean isAllNotZero = false;for(int i = 0; i < integers.length - 1; i++) { if(integers[i] != 0) { boolean isAllNotZero = true; }}if(isAllNotZero) { // Do something } else { // Do something else}