python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
How do I generate a list of prime numbers up to 100 and output that to a .txt file in this Java program?
I've got an assignment that requires me to test if an integer entered by the user is prime. I've got a good base for a general test, but the assignment is combined with another problem that requires m...
James Rager
Votes: 0
Answers: 0
Comparing a PrintWriter to another PrintWriter
I have two PrintWriters:
PrintWriter pw1 = new PrintWriter("testPrint.txt");
PrintWriter pw2 = new PrintWriter("testPrint.txt");
I want to to check if both of them print to the sa...
SamBridges
Votes: 0
Answers: 2
Why use Printwriter over PrintStream in Java for outputting human readable text
The java documentation says to use Printwriter over Printstream when dealing with text, but why is this so? I know Printwriter deals with character streams and Printstream deals with byte streams but ...
sniperking
Votes: 0
Answers: 1
Replacing a string from text file in Java
I've got a text file like this: https://i.stack.imgur.com/nL0Z4.png
The first column represents the user ID and the last column represents balance. I want to iterate through the elements to find a spe...
xephsandar
Votes: 0
Answers: 1