1
2
3
4
5
6
7
8
9
10
11 package com.puppycrawl.tools.checkstyle.checks.regexp.regexpsinglelinejava;
12
13 import java.io.FileReader;
14 import java.io.FileWriter;
15 import java.io.IOException;
16 import java.util.logging.Logger;
17
18
19 class Example5 {
20
21 private void testMethod1() {
22 int debug = 0;
23 System.out.println("");
24 System.out.
25 println("");
26 }
27
28 private void testMethod2() throws IOException {
29 FileReader in = new FileReader("path/to/input");
30 int ch = in.read();
31 while(ch != -1) {
32 System.out.print((char)ch);
33 ch = in.read();
34 }
35
36 FileWriter out = new FileWriter("path/to/output");
37 out.write("something");
38 }
39
40 public void testMethod3(){
41 final Logger logger = Logger.getLogger(Example5.class.getName());
42 logger.info("first");
43 logger.info("second");
44 logger.info("third");
45 System.out.println("fourth");
46 logger.info("fifth");
47 }
48 }
49