I have a class named "note" which provides a note with a title, a note, and a color. I save all the notes in a SQLite database. BDDManager is my SQLite database manager it inserts, removes etc... notes from database.
private void readNotes(){
Note note = new Note();
BDDManager.open();
note = BDDManager.getNoteWithTitle("Title");
if(note != null && note.getTitle() == "Title"){
addCardNote(note);
Toast toast = Toast.makeText(this, note.getCouleur(), Toast.LENGTH_LONG);
toast.show();
}
BDDManager.close();
}
In this part of the code, if I don't remove "note.getTitle()=="Title"" it doesn't work. And all the strings from my database are not equal to what they are supposed to be equal