 Hello friends, I am Sanjay Gupta. I welcome you on my channel. You can watch various programming related videos on my channel. So search it, subscribe it. You can find more than 800 videos related to programming on my channel. In this video, I am going to demonstrate you how you can calculate some of two numbers using command line arguments in Java. So public class CMD is written already here. Now inside this class, I am implementing main method. Inside main method, I will be writing some instructions which will calculate some of two numbers which are passed through command line arguments. So all the command line arguments are received in this array, ARGS. Here name is ARGS. You can write any particular name, whichever is required. But its data type will always be string. Now I am declaring some variables. I have declared three variables ABC. Now, first I need to convert those string values into integer so that I can perform addition operation. So I am calling a particular function that is parsing which is available in integer class. So I am calling integer dot parsing and I am passing ARGS zero inside it. So zero index will be containing first number that will be in form of string. So string will be converted into integer through this parsing method and will be assigned into a variable. Similarly, I can write integer dot parsing ARGS one. So this way, second argument will be converted into integer. Now I can easily calculate addition of those two numbers and the result will be stored inside C variable. Now I am going to display some on output screen with this system dot out dot print telling statement. So this way I have implemented the complete code in front of you which will receive two numbers from command line and there some will be displayed on output screen. Now, first I need to compile the code through Java C command. Then I can run the code through Java command. So while I will be executing this code at that time I need to pass command line arguments. So here I am passing 11 and 12 as command line arguments. ARGS zero will be receiving 11 and ARGS one will be receiving 12. You can see the output sum equals to 23. So 11 and 12 both are added and the result 23 is displayed on output screen. So this way I have implemented the code in front of you which is calculating some of two numbers using command line arguments. If you want to add more numbers then you can increase number of variables like this. Here three numbers will be converted and there some will be stored in D variable. This way I have modified the code again. This time you have to pass three command line arguments and there some will be displayed on output screen. You can see I have compiled the code. I have executed the code and I have passed 11 12 and 13 as arguments and their sum is equals to 36. So this way I have converted all three numbers into integers and then added those numbers to produce the result. I hope you have understood how I have calculated this with the help of Java code. If you want to follow me you can subscribe my YouTube channel. Thank you for watching this video.