java - Sort() "cannot find symbol" -
OK You should use: More: 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 ()); }}
Java .util.Collections;
Collections. Source (Mentare);
Comments
Post a Comment