Check out example codes for "How to make arguments minecraft java". It will help you in understanding the concepts better.

Code Example 1

if (alias.equalsIgnoreCase("hello") {
	if (args.length == 0) { //Sender only typed '/hello' and nothing else
		sender.sendMessage("You only typed hello!");
 
	} else { //Sender typed more then 1 argument, so args[0] can't be null.
		if (args[0].equalsIgnoreCase("sir") { //Sender typed '/hello sir'
			sender.sendMessage("You typed hello sir!");
		} else { //Sender had attest 1 argument, but didn't type sir as a second one!
		//args[0] also returns string, so lets send the message right back to them!
			sender.sendMessage("Your first argument was: " + args[0]);
 
	}
}

Learn ReactJs, React Native from akashmittal.com