The command line args are passed to the main() method in a String array. The search would use loops and if statements to see if any of them are in the array.