Java- Greater number in two numbers

//To find greater number in two numbers

public class Biggernumber {
    public static void main(String[] args)
                int numa=40, numb=20;
                        System.out.print(“Both numbers are equal”);
                                  System.out.print(“Greater Number =”+numa);
                                  System.out.print(“Greater Number =”+numb);

8 Responses to Java- Greater number in two numbers

  1. Heywood says:

    Wow. I’m currently working on a business suite to compare numbers in various ways, and I find your example enlightening. I hope it’s provided under a generous license, so I can use it in a commercial project.

    What I especially enjoy about your work is that you waste no space on separating business logic (comparison) from IO, as many programmers do these days.

    At any rate, this looks like a great foundation for more advanced projects. For example, you could compare floats for size or get the numbers from the user somehow rather than hard-coding them. But for most real-world applications, what you have here is more than enough.

    Oh, do you happen to work for Microsoft?

  2. Heywood says:

    P. S. Terribly sorry if you can’t read my comment; I hope there’s someone in India who can translate it for you from English. Oh, and have them fix your “gallary” while at it.

  3. Edward says:

    Heywood, stop being a jerk. Get a life.

  4. Casey says:

    Uh, dude? Ternary Operator.

  5. a$$whole says:

    if you had s_x ( _ == E ) with two fag_ots ( _ == G ), what code would you use to find out who has the bigger co_k ( _ == C )?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: