I have a simple doubt. Would be great if anyone helps me.
I have two strings:
String string1 = "4"; // and
String string2 = "04";
Both the values are equal but how to compare them in java? We have equals
and equalsIgnoreCase
for comparing String alpha values, similarly how to compare numeric values.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…