Java String split String by . dot
public class Main { public static void main(String[] args) { String sampleString = "CSS . HTML . Java."; String[] items = sampleString.split("\\."); for (String item : items) { System.out.println(">" + item+"<"); /*from w w w . j av a 2 s.com*/ } } }