java - Finding numbers within a certain range in an arraylist -


i have integer array list collects numbers user inputs. have display numbers within array <= 50, using method. how can this?

public static double levelr(list<integer> marks){   (int i= marks.get(0); i<= 50; i++){       system.println(marks.get(i));   } 

this have method far, i'm clueless on next.

you not need sort array solve problem. here do:

  • start writing loop prints elements of array regardless of value
  • modify loop skip printing numbers above 50. there 2 ways of doing - adding if uses continue on numbers above 50, or add if around printing.

Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -