Java tutorial
//package com.java2s; public class Main { public static boolean getBooleanForRestrictedOperator(String value, String result, String operator) { if (operator.equals("=")) { return value.equals(result); } else if (operator.equals("!=")) { return !value.equals(result); } return false; } }