So here's a bit about the details.
I need to read the contents of file A, and B and store it in file C by joining the contents of A and B and also counting the number of letters/characters present in it.
I've come up with this so far.
Can someone help me here.
Any input would be great.
import java.io.FileInputstream;
import java.io.FileNotFoundException;
import java.io.IOException;
public class JavaApplication43{
public static putwrite(string fname) throws FileNotFoundException, IOException
{ FileInputStream m=newFileInput stream(fname), FileOutput stream o=newFileInputStream("D:\\hello.txt", true);
System.Out.println(""m.available());
int count=0,read=0;byte[] b=newbyte[100];
while((read =m.read(b))!=-1)
{if(read<b.length)
o.write(b,op.lenght);
else
o.write(b);
count+=read;}
return count;}
public static void main(string[]args)throws FileNotFoundException,IOException
{int abc=write("D:\\kolekar.txt");
ab=abc+write("D:\\man.txt");
System.out.println(abc);
}
}