0

I am Java beginner. I dont understand why .toLowerCase() is not working when placed in if condition.

A simple version of my code:

if ( recType.toLowerCase() == "device") {
          System.out.println("done");
      }

it works when recType= "device" ofcourse but when recType="Device", it doesnt convert it to "device" so whats inside the if condition is not implemented!!. Any ideas?

IS92
  • 690
  • 1
  • 13
  • 28

0 Answers0