if (sepoca.matches(regex)) {
return true;
}
return false;
This segment is a bit like
if (true) {
return true;
} else {
return false;
}
And when you see it that way you realize that it lacks expressiveness.
You should probably just say:
return sepoca.matches(regex);
which is a complete statement that does the same thing.
Ian
"Brevity is the soul of wit" (and sometimes, in
Java,of readability).