-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFindPassCapital.java
More file actions
25 lines (23 loc) · 866 Bytes
/
FindPassCapital.java
File metadata and controls
25 lines (23 loc) · 866 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
import java.util.ArrayList;
public class FindPassCapital implements Runnable{
ArrayList valList;
FindPassCapital(ArrayList value){
valList = value;
}
public void run() {
// Find Capital
char capital;
FindPass findPass = new FindPass(null);
for (int x = 0; x < findPass.password.length; x++) {
for(capital='A';capital <= 'Z'; capital++) {
if (findPass.password[x] != capital) {
System.out.println("Thread [ID-"+Thread.currentThread().getId()+"] Searching.. " + capital);
} else {
System.out.println("Capital Thread [ID-"+Thread.currentThread().getId()+"] Found ->> " + capital);
valList.set(x,capital);
break;
}
}
}
}
}