Skip to content

Commit

Permalink
Challenge_1_git
Browse files Browse the repository at this point in the history
From Browser
  • Loading branch information
rhagee authored Oct 12, 2019
1 parent b989b47 commit e6a15cb
Show file tree
Hide file tree
Showing 3 changed files with 1,319 additions and 0 deletions.
46 changes: 46 additions & 0 deletions First_Challenge/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package First_Challenge;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class Main
{
public static void main(String[] args) throws Exception
{
BufferedReader reader = new BufferedReader(new FileReader("src/First_Challenge/file.txt"));
Thread thread = new Thread();
thread.start();
List<myThread> thrlist = new ArrayList();
List<String> lines = createList(reader);
int startc=0;
int startr=0;
for(int i=0;i<lines.size();i++)
{
char[] line = lines.get(i).toCharArray();
for(int j=0;j<line.length;j++)
{
if(line[j]=='$')
{
List<String> newlines = new ArrayList();
newlines = List.copyOf(lines);
myThread tr = new myThread(i,j,newlines);
tr.start(); //start
thrlist.add(tr);
}
}
}
}

private static List<String> createList(BufferedReader reader) throws IOException {
List<String> lines = new ArrayList();
String line="";
while((line=reader.readLine())!=null)
{
lines.add(line);
}
return lines;
}
}
Loading

0 comments on commit e6a15cb

Please sign in to comment.