scenario
Car car= new Car()
car.setRegNumber("12345");
//check if the last 3 digit is matching
String expresionString="( Math.abs(regNumber) % 1000 == 345 )"
But the above expression fails with error "property or field 'Math' cant be found on object Car'. Ss there another way instead of using string conversion/substring.
I would use the
matchesoperator:It matches if the last 3 disgits are 345
or simply
if you want to use static methods like in your example, you have to put the classname into
T(..)