Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Re: How to find maximum, minimum and occurence time of index in an array list

    The java SE API doc: https://docs.oracle.com/javase/8/docs/api/index.html
    Find the class you are interested in the lower left frame, click it and the API doc for that class will be displayed in the...
  2. Re: How to find maximum, minimum and occurence time of index in an array list

    Look at the API doc for the Integer class to see what method to call to get its int value. There is no need for a new variable.
    Your code would look something like:

    It is possible to chain calls...
  3. Re: How to find maximum, minimum and occurence time of index in an array list

    The code to read the user's input is inside of the loop. That means the user is required to enter a value every time the loop goes around. Is that what you want? I thought the user's input would...
  4. Re: How to find maximum, minimum and occurence time of index in an array list

    Yes, that loop looks at each element in the list one at a time, starting with the first and going to the last.

    Now change the print statement to be controlled by a if statement that will only be...
  5. Re: How to find maximum, minimum and occurence time of index in an array list

    That would show all the elements in one line.
    I was asking for code that would show each element on its own line. That was preparing you to write code to compare the elements instead of printing...
  6. Re: How to find maximum, minimum and occurence time of index in an array list

    If all the numbers have been loaded into a list, can you write code to go through the list and print out its contents?
    Then instead of printing the contents, change the code to compare each element...
Results 1 to 6 of 6