MCPcopy Create free account
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

exceptions/Cleanup.java:8–26  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

6
7public class Cleanup {
8 public static void main(String[] args) {
9 try {
10 InputFile in = new InputFile("Cleanup.java");
11 try {
12 String s;
13 int i = 1;
14 while((s = in.getLine()) != null)
15 ; // Perform line-by-line processing here...
16 } catch(Exception e) {
17 System.out.println("Caught Exception in main");
18 e.printStackTrace(System.out);
19 } finally {
20 in.dispose();
21 }
22 } catch(Exception e) {
23 System.out.println(
24 "InputFile construction failed");
25 }
26 }
27}
28/* Output:
29dispose() successful

Callers

nothing calls this directly

Calls 2

getLineMethod · 0.95
disposeMethod · 0.95

Tested by

no test coverage detected