Skip to content
Advertisement

Tag: output

Why program did not show answer in out.txt?

The code should do a reverse and output the result to out.txt, but this does not happen, can you explain my mistake in the code. Thanks in advance Answer You are trying to reverse the string twice because of that the string is getting back to the original string. Also, there is an unnecessary (as per my understanding) while loop

How to output direction of shortest path?

This is a simple maze solver program. this is the simple maze i’m working on. I implemented a solution to output cordinates of the path as follow.(cordinates aquired from a BFS algorithm) but I want to output like below(omit same direction and only output direction and last coordinate to same direction), this all coordinates are allocated to a stack.below is

Using both FileInputStream and FileOutputStream

I am stuck on my problem where I have to read a file given by the user and then calculate names, grades, and such. But the issue I am having is that I need to take that data and store it in a text file names report.txt and then take the data from the first file and then compute the

Output is not showing for second array in Java

I’m a beginner in Java programming and I created a program that accepts 10 numbers as input from users and prints them. The first section is using for loop and the second section is using while loop. The first section works properly and the second section isn’t displaying output. Could anybody help me? } Answer You are not resetting variable

Java output: can’t write to subdirectory

How can I write to a file in a subfolder? Other answers on here said to use Paths, but no luck. In my code, for whichFileToSaveTo, if I remove “/Subfolder/” from it, my code works correctly and writes to the file. With “/Subfolder/”, I get a java.io.FileNotFoundException. I am using Windows 10. Thank you! Answer Solved. The solution was to

Advertisement