int randomInt = (int) (1+Math.random()*listaInt.size());
int x=1;
for(IntervaloTabelaResposta intervalo : listaInt) {
- if (x++ == random)
- return resposta.getTexto().replaceAll("&&tabela", intervalo.getTexto());
+ if (x++ == random) {
+ String returnResposta = resposta.getTexto().replaceAll("&&tabela", intervalo.getTexto());
+
+ if (returnResposta.substring(0,1).equals(returnResposta.substring(0,1).toLowerCase()))
+ return returnResposta.substring(0,1).toUpperCase() + returnResposta.substring(1);
+
+ }
}
}
}
}
public void processaRede() {
-System.out.println("PROCESSOU A REDE");
idPaciente = Long.valueOf(getTextParameter("pIdPaciente"));
Paciente paciente = em.find(Paciente.class, idPaciente);
public class Teste {
public static void main(String[] args) {
- int random = (int) (1+Math.random()*2);
- System.out.println("random: " + random);
+ String resposta = "vinicius maroni";
+ if (resposta.substring(0,1).equals(resposta.substring(0,1).toLowerCase()))
+ resposta = resposta.substring(0,1).toUpperCase() + resposta.substring(1);
+ System.out.println(resposta);
+
}
}