Java how to split from . (dot) or other character

Home  >>  Java  >>  Java how to split from . (dot) or other character

Java how to split from . (dot) or other character

13
Feb,2018

0
  Java
String textfile = "ReadMe.txt"; 

String filename = textfile.split(".")[0];

 String extension = textfile.split(".")[1];


Leave a Reply

Your email address will not be published. Required fields are marked *