Friday 20 December 2019

compare two strings in java using command line arguments

First of all you are trying to use wrong class, should be CompareStrings and not CompareString.


Second, I would recommend using a nice utility lib for handling command line called Cliche from Google Code site


And third, it would be good to check if the given string is null before you call compareToIgnoreCase on it

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...