-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConvertForCanvas.java
More file actions
27 lines (24 loc) · 853 Bytes
/
Copy pathConvertForCanvas.java
File metadata and controls
27 lines (24 loc) · 853 Bytes
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
import java.io.*;
import java.util.*;
public class ConvertForCanvas {
public static void main(String[] args) throws FileNotFoundException {
Scanner in = new Scanner(new File("InheritanceMystery.java"));
while(in.hasNextLine()) {
String line = in.nextLine();
//line = line.replaceAll("private static", "public");
for(int i = 0; i < line.length(); i++) {
if(line.charAt(i) == '[')
System.out.print("[");
else if(line.charAt(i) == ']')
System.out.print("]");
else if(line.charAt(i) == '<')
System.out.print("<");
else if(line.charAt(i) == '>')
System.out.print(">");
else
System.out.print(line.charAt(i));
}
System.out.println();
}
}
}