In this list event I want to convert the part of a getString to a getChar but I do not recognize it as char, how would its syntax be?
public List listar(){
List<BobConstruye> d=null;
try {
BDatos bddatos = new BDatos(this, "bdaula11.db", null, 1);
SQLiteDatabase bd = bddatos.getWritableDatabase();
Cursor datos = bd.rawQuery("select raza, peso,edad"+"sexo,finalidad, from ANIMALIA", null);
if (datos.moveToFirst()) {
d=new ArrayList<>();
do{
BobConstruye a = new BobConstruye();
a.setRaza(datos.getString(datos.getColumnIndex("raza")));
a.setEdad(datos.getString(datos.getColumnIndex("edad")));
a.setPeso(datos.getString(datos.getColumnIndex("peso")));
a.setFinalidad(datos.getChar(datos.getColumnIndex("finalidad")));
// a.setFinalidad(datos.getchar.getColumnIndex("finalidad"));
d.add(a);
}while(datos.moveToNext());
} else {
Toast.makeText(this,"No hay registros",Toast.LENGTH_LONG).show();
}
bd.close();
}catch (Exception e){
Toast.makeText(this,e.getMessage(),Toast.LENGTH_LONG).show();
}
return d;