import java.io.*; import java.util.*; class Delimit { public static void main(String[] args) throws IOException { Scanner filein = new Scanner(new File("file.txt")).useDelimiter(","); while ( filein.hasNext() ) { System.out.printf("(%s)", filein.next() ); } } }