đáp nào đúng thì hiện thị lại đúng như ảnh.
nhưng ở bên server em out.print ra thì nó báo là false là em sai ở đâu ạ
đoạn này là em lấy đáp án từ db về
if(instance.getQuestionId()!=null){
listAnswerSelect.clear();
Questions q=getEntityManager().find(Questions.class, instance.getQuestionId());
setInstance(q);
List<Answers> list=getEntityManager().createQuery("from Answers answer where answer.questions.questionId="+instance.getQuestionId()).getResultList();
for (Answers answers : list) {
System.out.print(answers.getCorrect()); // chỗ này in ra tất cả đáp án đều báo là false
if(!listAnswerSelect.contains(answers)){
listAnswerSelect.add(answers);
}
}
}
đây là dữ liệu trong db