Java tutorial
//package com.java2s; public class Main { public static boolean lastCharIsOperator(CharSequence text) { char last_char = text.charAt(text.length() - 1); return (last_char == '-' || last_char == '*' || last_char == '/' || last_char == '+'); } }