/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
			// TODO 自動產生的方法 Stub
		 
		 //Begin
		  String dst = "c:\\test0001.txt";
		  String orgstring2="c:\\";
		  String orgstring3="c:\\";
		  String teststr = "test0003.txt";
		  String teststr3 = "test0006.txt";
		  FileWriter fptr = new FileWriter(dst);
		  BufferedWriter writer01 = new BufferedWriter(fptr);
		  writer01.write(teststr, 0, teststr.length());
		  writer01.flush();writer01.close();
		  
		  
         //test1
		  System.out.println("orgstring2.length()");
		  System.out.println(orgstring2.length());
		  
		  System.out.println("teststr.length()");
		  System.out.println(teststr.length());
		  
	       for(int j=0; j<teststr.length() ;j++) {
	    	{orgstring2 += (teststr.charAt(j));}
	    	//System.out.println(teststr.charAt(j));
	    	//System.out.println(orgstring);
	    }
		 // System.out.println("END String");
		 // System.out.println(orgstring2);
		  System.out.println("orgstring2.length()");
		  System.out.println(orgstring2.length());
	
		  FileWriter fptr2 = new FileWriter(orgstring2);
		  BufferedWriter writer02 = new BufferedWriter(fptr2);
		  writer02.write(orgstring2, 0, orgstring2.length());
		  writer02.flush();
		  writer02.close();
		  
		  
		  
		  
		  
		  //Test3
		  System.out.println("orgstring3.length()");
		  System.out.println(orgstring3.length());
		  System.out.println("teststr3.length()");
		  System.out.println(teststr3.length());
		  
		  
		  //Test3
		  orgstring3 += teststr3;
		  System.out.println("orgstring3");
		  System.out.println(orgstring3);
		  System.out.println("orgstring3.length()");
		  System.out.println(orgstring3.length());
		  

		  //Test3
		  FileWriter fptr3 = new FileWriter(orgstring3);
		  BufferedWriter writer03 = new BufferedWriter(fptr3);
		  writer03.write(orgstring3, 0, orgstring3.length());
		  writer03.flush();
		  writer03.close();
		  
		  //END
	}
}