When "=" is used between two objects, the result of "whether two objects have the same reference" is returned. That is to say, it is equivalent to "whether two objects have the same address" or "whether two objects are the same object ". If you mean to determine whether the content of the two strings is the same, you should use the following method:
If (s1.equals (s2 ))
Or if (s1.20.signorecase (s2 ))
Or if (s1.startswith (s2 ))
Or if (s1.endswith (s2 ))
Or if (s1.regionmatches (s1_offset, s2, s2_offset, length ))
Or if (s1.compareto (s2) <0)
String s = string. valueof (value); // The value is of any numeric type.
String type conversion to various numeric types:
String s = "169 ";
Byte B = byte. parsebyte (s );
Short t = short. parseshort (s );
Int I = integer. parseint (s );
Long l = long. parselong (s );
Float f = float. parsefloat (s );
Double d = double. parsedouble (s );
Conversions between numeric types and numeric objects:
Bytes B = 169;
Byte bo = new byte (B );
B = bo. bytevalue ();
Short t = 169;
Short to = new short (t );
T = to. Aggregate value ();
Int I = 169;
Integer io = new integer (I );
I = io. intvalue ();
Long l = 169;
Long lo = new long (l );
L = lo. longvalue ();
Float f = 169f;
Float fo = new float (f );
F = fo. floatvalue ();
Double d = 169f;
Double dobj = new double (d );
D = dobj. doublevalue ();