How to take any bumner of arguments form command line and to search in arraylist>

I now do it in with defined number of arguments and take every argument and search, but this is unlcear to me?

Thanks

You need to loop through the argument array and search for each element in turn.

That I understand but how to take all arguments and split them, like arg[0],arg[1] and so on?

Well. exactly like that! The parameter is a perfectly ordinary array of Strings that you can access or index just like any other array.
Eg

for (int i = 0; i < arg.length; i++) {
    // do stuff with arg[i]
}

or

for (String s : arg) {
    // do stuff with s
}

Thanks, I was confued about that...