CRUD: List Method

-3

Good evening, I'm learning about CRUD in my mobile programming course, we're programming in a SQLite database, as the project is not yet ready for the teacher's own reasons, to check if the Database works, we're putting the data in the first screen that appears in the app (in the case the presentation screen) to load and so the data is already recorded, however as the image shows, is giving error in the obj and I can not understand why. Only from error if it is obj, anything else written not from error. I have already compared the project to the teacher's project, I did not find the problem, what can it be?

    
asked by anonymous 17.09.2018 / 06:06

1 answer

1

You have an error in this line because you are already instantiating a variable of type MediaSchool on line 33 and therefore in the cycle you must use another name. For example try this and see the result:

for(MediaEscolar media : objectos){
Log.d( "Matéria : " + media.getMateria() + " Semestre : " + media.getBimestre() + " Media :" + media.getMediaFinal())
}
    
17.09.2018 / 12:46