+ 1
How to substring string in Java?
I have "sampleInput" string and I need to cut some part of my string. I need start with index 1 and end with my string length. How to get cutted string? Input: understanding Output: nderstanding
2 Answers
+ 4
Roman Koteev
String str = "time";
str = str.substring(1, str.length());
//ime
+ 4
Roman Koteev ,
it is not quiet clear what your problem is. if you expect a helpful answer please keep in mind:
- give a clear and complete task description
- add some samples with input and the expected output values
thanks for understanding!