Код: Выделить всё
String originalText =" Bangladesh's first day of Test cricket on Indian soil has not been a good one. They end the day having conceded 71 runs in the last 10 overs, which meant they are already staring at a total of 356. M Vijay was solid and languid as he made his ninth Test century and third of the season. ";
String afterOptimized=originalText.substring(0, 60);
System.out.println("This is text . "+afterOptimized);
Код: Выделить всё
This is text . Bangladesh's first day of Test cricket on Indian soil has n
Подробнее здесь: https://stackoverflow.com/questions/421 ... ter-trunca