Changes for Code review feedback:
1. Change main method to use command-line input. 2. Update test class to use static imports. 2. Add more use cases in test-cases.
This commit is contained in:
+5
-2
@@ -44,8 +44,11 @@ public class LongestSubstringNonRepeatingCharacters {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String input = "CODINGISAWESOME";
|
||||
System.out.println(getUniqueCharacterSubstring(input));
|
||||
if(args.length > 0) {
|
||||
System.out.println(getUniqueCharacterSubstring(args[0]));
|
||||
} else {
|
||||
System.err.println("This program expects command-line input. Please try again!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user