nir sharma wrote:well, you wont get a ready to use code here, try and write on your own using your logic and concepts , if you face any difficulty then post it.
I tried creating one code but it's not working for me. Please check
while(scanner.hasNext()){
String line = scanner.nextLine();
String out1="";
while (line.startsWith("E"))
{
while(line.startsWith("S"))
{
out1=out1+line.substring(0,15);
++processedLines;
line = scanner.nextLine();
}
writer.println(out1);
System.out.println(out1);
++processedLines;
line = scanner.nextLine();
}
Thanks!!