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
i am getting output as below
The final <new line> is obviously missing, "this part" is the shell's prompt for the next command. How did you print your output? Please show your adapted code.
You're doing two things here: you are writing several constants and variables to a temp file, without a <new line> character, and close that file. Then, you read that file, print it to screen / terminal including a <new line>, and add another string constant with <new line>.
No surprise the <new line> is missing when you cat the temp file to screen.
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
{... (1 Reply)