Hint: Your variable names made it hard for me to read your code. Variable names that indicate what they are -- really help. a,b,c,d,e do not convey much.
Code:
b.write(c,1,4);
This creates what you see in the file. "\n" works to solve your problem - watch out for windows OS.
So you need another call to write to c with one character, "\n".
through below code i am trying to write a content in a file and then reading the same file
my code is running file but is not getting in proper way
import java.io.*;
class A1
{
public static void main (String agrs)
{
byte b = {'a','e','i','o','u'};
String s = "King Maker";
try
{... (7 Replies)