I have a variable which i obtain from another class. I then run a != "" check in an IF statement. On the summary2, the value should be "" and so the if statement should go to else but it does not.
getArticle data = getArticle.getMyData();
if (data.summary1 != "") {
tvSummary1.setText(data.summary1);
} else {
tvSummary1.setVisibility(View.GONE);
}
if (data.summary2 != "") {
tvSummary2.setText(data.summary2);
}else {
tvSummary2.setVisibility(View.GONE);
}
This is what i get when debugging: