Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Adelisa Fischer   on Jun 28 In Java Category.

  
Question Answered By: Mamie Wallace   on Jun 28

Object cannot be compared with the '==' operator
Use the equals() method of the String class.
Replace your statement,
if (answerColumns[2] == "YN") {
with this,
if (answerColumns[2].equals("YN")) {

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 


Tagged: