java - Sort() "cannot find symbol" -


OK Collection.sort (myintarray); There is some problem with the line ... I can not find the symbol trying to sort the list, so that the lowest number in the array comes first.

  package uppgift.pkg1; Import java.util.ArrayList; Import java.util.Collection; Import java.util.list; Import java.util.Arrays; / ** * @ Author Friedrich * * / Public Class Uppgift1 {Public Static Zero Main (string [] Args) {// Undrop and Metod SkipAre (); } Public stable zero skapaArray () {List & lt; Integer & gt; Mantarare = New Arrestist & lt; Integer & gt; (); Int ints = 0; Int size = 1; While (ints & lt; size) {myintarray.add (ints); Ints ++; } collection. Sort (mointera); Println (myintarray.size ()); }}    

You should use:

  Java .util.Collections;   

More:

  Collections. Source (Mentare);    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -