Hi
i am new to java and written a below code on linux platform which is working fine but not getting the output on terminal as expected
vi A.java
import java.io.FileOutputStream;
class A
{
public static void main (String args[])
{
byte[] c= {'a','e','i','o','u'};
try
{
FileOutputStream b =new FileOutputStream("/home/k");
b.write(65);
b.write(c,1,4);
b.getChannel();
b.close();
System.out.println("success");
System.out.println(b.getChannel());
System.out.println(b.getFD());
}
catch(Exception e)
{
System.out.println(e);
}
}
}
here i am getting below Output which is correct
[root@1s home]# cat k
Aeiou[root@1s home]#
but i want output as below. how should i get this. suggest the way forward.
[root@1s home]# cat k
Aeiou
[root@1s home]#