Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

java: how to write a text file

0 votes
asked Jan 3, 2019 by Ubaldo Rauso (130 points)
retagged Jan 3, 2019 by Ubaldo Rauso

I'm trying to write a text file with a Java program.

I'm able to read a file with your tool but not to read. Can you help me?

Thanks in advance


2 Answers

0 votes
answered Jan 4, 2019 by aylonbrandes (140 points)
you can do like this

// and your texst


/* and type a multi line */
0 votes
answered Apr 9, 2019 by zemiak (550 points)
edited Apr 9, 2019 by zemiak
java prg solution

if you mean how to write and use file on online GDB webpage,
In GDB web: open new file on other tab (ctrl+M) and use it's name as file name in your code
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.