Answers for "file in java split"

2

split on . in java

String textfile = "ReadMe.txt";
String filename = textfile.split(".")[0];
String extension = textfile.split(".")[1];
Posted by: Guest on October-15-2020
0

how to use split on a file name java

String textfile = "ReadMe.txt"; 
String filename = textfile.split("\\.")[0]; 
String extension = textfile.split("\\.")[1];
Posted by: Guest on April-08-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language