Skip to content

Commit 6e92a85

Browse files
committed
Move all main functions to Main package
1 parent 34b3d8b commit 6e92a85

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/main/java/main/main.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package main;
2+
3+
import hackerrank.java.CompareSubstrings;
4+
import java.util.Scanner;
5+
6+
/**
7+
*
8+
* Main runner class for all Classes that needs
9+
* to be invoked from CLI.
10+
*
11+
*/
12+
public class main {
13+
/**
14+
* Reads String of single word and
15+
* int to substring to break string.
16+
*
17+
* @param args
18+
*/
19+
public static void main(final String[] args) {
20+
21+
try (Scanner scan = new Scanner(System.in)) {
22+
final String randomString = scan.next();
23+
final int substringLength = scan.nextInt();
24+
25+
final CompareSubstrings compareSubstrings =
26+
new CompareSubstrings(randomString, substringLength);
27+
28+
compareSubstrings.createSubstrings();
29+
30+
}
31+
}
32+
}

0 commit comments

Comments
 (0)