Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { private static boolean isFieldValid(int field) { return (field != -1) && (field != Integer.MAX_VALUE); } }