Skip to content

Commit ed35e75

Browse files
committed
新增:改变System.out输出案例
1 parent 2334a45 commit ed35e75

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package org.javacore.io;
2+
3+
import java.io.PrintWriter;
4+
/*
5+
* Copyright [2015] [Jeff Lee]
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
20+
/**
21+
* @author Jeff Lee
22+
* @since 2015-10-6 18:38:15
23+
* 改变System.out输出案例
24+
*/
25+
public class ChangeSystemOut {
26+
public static void main(String[] args) {
27+
PrintWriter out = new PrintWriter(System.out,true);
28+
out.println("Hello PrintWriter");
29+
out.close();
30+
}
31+
}

0 commit comments

Comments
 (0)