-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProb03_stream.java
More file actions
47 lines (39 loc) Β· 1.21 KB
/
Copy pathProb03_stream.java
File metadata and controls
47 lines (39 loc) Β· 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package java0911_stream.prob;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.LineNumberReader;
import java.util.Iterator;
import java.util.stream.Stream;
/*
* [λ¬Έμ ]
* sun.txtνμΌμμ λ°μ΄ν°λ₯Ό μ½μ΄μ¨ν β\tβμ β βμ β-β λ‘ λ³ννμ¬
* νλ‘κ·Έλ¨μ ꡬννμμ€.
*
* [νλ‘κ·Έλ¨ μ€νκ²°κ³Ό]
* hello-world-!!!
* java-programming
* jsp-servlet-programming!
*/
public class Prob03_stream {
public static void main(String args[]) {
String[] lines = readLines(".\\src\\java0911_stream\\prob\\sun.txt");
for (int i = 0; i < lines.length; i++) {
printLine(lines[i]);
}
}
public static String[] readLines(String fileName) {
/*
* νλΌλ―Έν°λ‘ μ λ¬λ°μ txtνμΌμ μ½μ΄ λ€μ¬, νμΌμ μ€ μμ ν΄λΉνλ String[]μ μμ±νμ¬ ν΄λΉ String[]μ ν
* λΌμΈμ© μ μ₯ν΄μ λ°ννλ€.
*/
return null;
}// end readLines()
public static void printLine(String line) {
/*
* λ¬Έμμ΄μ λ°μλ€μ¬ β\tβμ β βμ β-β λ‘ λ³ννμ¬ μ½μμ μΆλ ₯νλ€.
*/
}// end printLine()
}// end class