Check out example codes for "remove part of string java". It will help you in understanding the concepts better.

Code Example 1

// Works only if you have a certain character at which you want to cut
String text = "Image.png";

String[] cutText = text.split("\\.");

// cutText[0] has value "Image"
// cutText[1] has value "png"

Learn ReactJs, React Native from