Estou tentando compilar e dá erro, alguém pode dizer o que ocorre?
class, interface or enum expected
public static boolean verificaData(String texto) {
mport java.util.*;
import java.text.*;
public static boolean verificaData(String texto) {
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
sdf.setLenient(false);
try {
sdf.parse(texto);
return true;
}
catch (ParseException ex) {
return false;
}
}
obrigado