We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Java
- Introduction
- Java End-of-file
- Discussions
Java End-of-file
Java End-of-file
Sort by
recency
|
1170 Discussions
|
Please Login in order to post a comment
The task may look simple at first, but it really teaches you how to use loops and scanners effectively in Java. It’s also a good way to practice formatting output while processing multiple lines of input. Winstar exchange
public class Solution {
}
All recent soluitions I see here seem to ignore the requirement of reading all of the input first and only then printing the output. Such an approach is obviously more performant, but in real world requirements are there for a reason and unauthorized 'improvements' can lead to bugs.
import java.io.; import java.util.; import java.text.; import java.math.; import java.util.regex.*;
public class Solution {
}
import java.io.; import java.util.; import java.text.; import java.math.; import java.util.regex.*;
public class Solution {
}