Results 1 to 7 of 7
  1. #1
    suprabha is offline Member
    Join Date
    Jul 2008
    Posts
    20
    Rep Power
    0

    Default [SOLVED] max function

    hi all,
    can you suggest me how to use max function and how to use it in incrementing int values..

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    In simple way, do you want to try something like this?

    Java Code:
            for(int i = 0; i < 5; i++) {
                for(int j = 0; j < 5; j++) {
                    System.out.println("Max of " + i + " and " + j + " is: " +
                            Math.max(i, j));
                }
            }

  4. #4
    suprabha is offline Member
    Join Date
    Jul 2008
    Posts
    20
    Rep Power
    0

    Default

    thank you.....

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  6. #6
    suprabha is offline Member
    Join Date
    Jul 2008
    Posts
    20
    Rep Power
    0

    Default

    i dont know to mark so..how?

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    On top of this thread, you can see the "Post Reply" button. Just bellow that button you can see a menu. Click on Thread Tools menu, and you can see few options there.

Similar Threads

  1. Need a little help with a function!
    By Nuluvius in forum New To Java
    Replies: 3
    Last Post: 02-07-2008, 11:33 PM
  2. Function in a variable
    By beserie in forum New To Java
    Replies: 4
    Last Post: 01-07-2008, 03:12 AM
  3. I want to add function
    By romina in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 05:25 AM
  4. function name
    By osval in forum Advanced Java
    Replies: 1
    Last Post: 08-06-2007, 08:56 PM
  5. Help with the Dummy Function
    By Felissa in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 07-06-2007, 05:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •