eclipse - Java uses a String constant with the quotes -


when compare constant string mb inside variable mb inside result false. string constant looks "mb" ([",m,b,"]=4 length) , variable "mb" ([m,b]=2 length). what's wrong here. java cannot put quotes inside code string.

string constant

var 2

public static final string gc_telcodefixed  = "fx";  if (!telcode.getid().equals(com.quoka.qis.db.constant.constants.gc_telcodefixed))      throw new telcodetypemismatchexception(telcode.gettype());  

invisible characters might cause behavior.

how did "mb" got there? did type them or copy-paste program? copy-paste operation might end invisible characters , text editors not show them.

this can reproduced copying pdf file linux document viewer.

hope helps, yaron


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -