# Command-Line program  find the Largest number

- Link: https://technotaught.com/command-line-program-find-the-largest-number/
- Published: 2018-11-03T20:55:09+05:30
- Author: Ashishkumar Vishwakarma

This article explains, Program to demonstrate Command-Line to find the Largest number.

![Command-Line program  find the Largest number](https://technotaught.com/wp-content/
uploads/2020/11/Command-Line-program.png)

## Program to demonstrate Command-Line to find Largest number.

#### SOURCE CODE  .

    ```wp-block-code
    class cmd
    {
    	public static void main(String args[])
    	{
    		int a,b;
    		System.out.println("largest number: ");
    		a=Integer.parseInt(args[0]);
    		b=Integer.parseInt(args[1]);
    		if(a>b)
    		System.out.println("a is Greater :" +a);
    		else
    		System.out.println("b is Greater:" +b);
    	}
    }
    ```

#### OUTPUT.

> C:\A>javac cmd.java
> C:\A>java cmd 12 34largest number:b is Greater:34

Also, View- [Write a java program to create a window using swing.](https://technotaught.com/22-write-a-java-program-to-create-a-window-using-swing/)

### Share this:

 * [  X ](https://technotaught.com/command-line-program-find-the-largest-number/?share=twitter)
 * [  Facebook ](https://technotaught.com/command-line-program-find-the-largest-number/?share=facebook)
 * [More](https://technotaught.com/command-line-program-find-the-largest-number/#)

 * [  WhatsApp ](https://technotaught.com/command-line-program-find-the-largest-number/?share=jetpack-whatsapp)
 * [  LinkedIn ](https://technotaught.com/command-line-program-find-the-largest-number/?share=linkedin)
 * [  Email ](https://technotaught.com/command-line-program-find-the-largest-number/?subject=%5BShared%20Post%5D%20Command-Line%20program%20%20find%20the%20Largest%20number&body=https%3A%2F%2Ftechnotaught.com%2Fcommand-line-program-find-the-largest-number%2F&share=email)
 * [  Reddit ](https://technotaught.com/command-line-program-find-the-largest-number/?share=reddit)
 * [  Tumblr ](https://technotaught.com/command-line-program-find-the-largest-number/?share=tumblr)
 * [  Pinterest ](https://technotaught.com/command-line-program-find-the-largest-number/?share=pinterest)
 * [  Telegram ](https://technotaught.com/command-line-program-find-the-largest-number/?share=telegram)
 * [  Print ](https://technotaught.com/command-line-program-find-the-largest-number/#print?share=print)

### _Related_
