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
|
1121 Discussions
|
Please Login in order to post a comment
public class Solution {
}
**
import java.io.; import java.util.; import java.util.Scanner; public class Solution {
}
solution:
Scanner in = new Scanner(System.in); int lineNumber=1; while (in.hasNextLine()) { String line = in.nextLine(); System.out.println(lineNumber + " " + line); lineNumber++; //