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:
akash.pandey
2018-12-02 10:44:27 +05:30
parent ed0713046f
commit ca681a8e67
2 changed files with 21 additions and 7 deletions
@@ -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!");
}
}
}