Results 1 to 3 of 3

Thread: array

  1. #1
    Join Date
    Jul 2010
    Posts
    22
    Rep Power
    0

    Default array

    Is it possible to display the highest value (among 5 entered values) using array only? even without using if else statement....


    thanks :)
    Heart is the only broken thing that still works.

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,458
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by blindfolded916 View Post
    Is it possible to display the highest value (among 5 entered values) using array only? even without using if else statement....
    Have a look at the Math.max( ... ) method.

    kind regards,

    Jos

  3. #3
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,332
    Rep Power
    25

    Default

    using array only? even without using if
    You need a way to test a condition. Normally the if(condition) is used for that.

    What other statements do you know that have conditional parts to them?
    You might be able to use while(condition)

Similar Threads

  1. convert byte array into char array
    By kgkamaraj in forum New To Java
    Replies: 4
    Last Post: 09-13-2011, 11:32 AM
  2. create a 2d char array from a 1D string array
    By jschmall12 in forum New To Java
    Replies: 1
    Last Post: 04-27-2010, 09:01 PM
  3. Convert Char Array to String Array
    By Mayur in forum New To Java
    Replies: 8
    Last Post: 10-12-2009, 11:41 AM
  4. Array length and printing out uninitialized array.
    By nicolek808 in forum New To Java
    Replies: 4
    Last Post: 09-10-2009, 09:12 AM
  5. Replies: 1
    Last Post: 03-31-2009, 06:40 AM

Posting Permissions

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