Primitive types do not have methods, so l.toString() will not compile.
Long.parse() accepts String object containing number as a parameter and returns Long object, so this is not a way to create string.
Long.toString(l) converts primitive long value to the string representation.
Operator plus + when accepts a string as and argument, converts second argument to String and makes a concatenation of strings, so ("" + l) will also create a string representation of long value.
Войдите чтобы поставить Нравится
Войдите чтобы прокомментировать