There are 2 variables:
String one = "123456789"; String two = "";
I need to copy the value of the variable one to the variable two , starting at 5 digits.
one
two
How can I do that?
You can use the substring(int beginIndex) method substring(int beginIndex) of the String class.
substring(int beginIndex)
String
If with 5 characters (inclusive), then:
String one = "123456789"; String two = one.substring(4);
Source: https://ru.stackoverflow.com/questions/593606/More articles:How to make on javascript (e) with a double click the appearance of a window for entering numbers?Write png pictures without using java.awt.image.BufferedImagedoes not work with ajax requestundefined reference to protector :: Winner :: Winner () [closed]Search for a combination of characters in the stringI can not synchronize access to the control from different threadsDecoding escaped Unicode characters in C ++Resize button (JButton) when adding characters to it?How to refer to the element of the code?Strangeness with binding wpfAll Articles