Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

get the max value from arrayList java and save it in int

List<Integer> list = new ArrayList<>(); // Creating List
   list.add(3); //add elements
   list.add(6);
   list.add(9);
int maxNum = Collections.max(list); //save the biggest element in variable
System.out.println(max); //print 9
 
PREVIOUS NEXT
Tagged: #max #arrayList #java #save #int
ADD COMMENT
Topic
Name
9+7 =